SAN DIEGO (AP) _ Interest rates likely will get slightly worse for savings institutions but slightly better for their customers, S&L officials and economists predict.

A record wide gap between mortgage and deposit rates has helped the once- moribund thrift industry return to profitability over the last year and a half.

Economists and S&L executives attending the annual convention of the Savings & Community Bankers of America, which ended Wednesday, say that gap should narrow, with mortgage rates falling a bit and deposit rates rising gradually.

Economist James W. Christian, a consultant based in Boene, Texas, predicted long-term rates, including mortgages, could fall three-quarters to 1 percentage point over the next two years. Deposit rates over that period may increase by half a percentage point, he said.

But he and others say the direction mortgage rates take will depend in part on whether President-elect Clinton convinces financial markets that his actions won't cause the budget deficit to balloon.

Since early September, when average interest on 30-year, fixed-rate mortgages hit a 19-year low of 7.84 percent, rates have jumped by nearly half a percentage point.

That's a reflection of the financial markets' nervousness over what Clinton might do, the executives and economists said.

If the new president wants to see rates stabilize or even edge downward, he must make sure any effort to stimulate economic growth is coupled with a credible plan to reduce the deficit, they said.

That's essential to prevent an increase in interest rates from offsetting the economic effect of any stimulus from increased government spending or tax cuts, they said.

Martin Regalia, chief economist of the trade group, said he believed Clinton would resist pressure from more liberal Democrats and keep his economic package relatively moderate.

If that happens, mortgage rates, which hit a four-month high of 8.29 percent last week, according to the Federal Home Loan Mortgage Corp., could fall as low as 7.5 percent or 7.25 percent by the middle of next year, he said. If not, they could shoot up above 9 percent, he said.

''I think Clinton's a pretty sharp guy and I think his advisers are pretty sharp,'' Regalia said. ''They have a guy with a mandate and they don't want to mess it up by doing something stupid that causes financial markets to react badly.

''If they do this one right, they could be looking at a fairly long run of a reasonably good economy. But if they mess this one up, it could be a nightmare four years.''

In a survey by the trade group, 500 S&L executives questioned predicted rate stability. Only 10 percent said they expected a substantial increase over the next six months.

Seventy-one percent anticipate a moderate increase of 1 percentage point or less. An additional 16 percent expect no change in rates and 3 percent see a modest decrease of less than 1 percentage point.

''I wouldn't expect to see much change in interest rates for a long time,'' said David F. Holland, chairman of the Boston Federal Savings Bank in Burlington, Mass. ''I would think that they would remain stable or only slightly increase.''

S&L executives said many depositors, especially retired people, are being hurt by the lowest deposit rates since the Depression.

''A lot of our customers ... even say, 'When are we going to be paying you instead of you paying us?''' said Elliott Knutson, chairman of Washington Federal Savings and Loan Association in Seattle.

Knutson said if economists' forecast of a slowly improving economy proves correct, deposit rates at least won't drop further. However, he said, they probably won't increase much either.