More Americans are optimistic about the direction of the nation's economy today than at any time in the past two years, according to the findings of a Washington Post-ABC News opinion poll.

Sharply growing numbers of people expect better financial circumstances for themselves and the country in the year ahead. And in a striking shift of sentiment, the public for the first time in a Post-ABC News poll tends to see inflation as a declining problem.

That would seem to be especially good news for President Reagan, who for more than a year has claimed credit for the plummeting rate of inflation. Overall, however, the poll's findings are at best a mixed bag politically for Reagan.

Most citizens are still cautious and worried about the economy, and the increase in optimism has not spread to blacks or to whites of moderate income. Nevertheless, the change for the better in the national mood is striking:

* Thirty-nine percent in the new poll said they believe the nation's economy is getting better. That is more than double the 18 percent who felt that way at the end of January. And at no time in any of a dozen Post-ABC News surveys since March 1981 have more than 21 percent said they felt the economy was improving.

* Similarly, 43 percent in the new poll said they will be better off a year from now, about half again as many as felt that way in January and also substantially higher than in any survey since March 1981.

* Forty-eight percent in the new poll see inflation as less of a problem than it was a year ago, compared with 37 percent who say it is more of a problem. That is almost an exact reversal from January when, by 52 to 37 percent, people saw inflation as a worse problem than it had been a year earlier.

The response to two poll questions tells much of the story: by almost 2 to 1, people agree with Reagan's pronouncement that America "is on the mend." But by 4 to 1, people disagree with another contention Reagan has made, that the recession is over.

The recession is not over, maintained one of those interviewed, a 20-year-old housewife from a small town in southern Georgia. Her husband brings home less than $8,000 a year and, she said, "Everything is going so high, I can't hardly buy anything."

The opposite view was aired by a 45-year-old New Hampshire man who said he is employed as a rigger overhauling nuclear submarines. He and his wife work full time and have an income between $20,000 and $30,000 a year. "Gas prices, heating oil and interest rates are dropping," he said. "When housing starts are up, then people will know the recession is over."

All the increase in optimism toward the economy comes from people like this New England man, those with annual household incomes of $20,000 or more. It is especially concentrated among those who report incomes between $30,000 and $50,000.

The young Georgia housewife is typical of her income group, too: On the whole, those with household earnings below $20,000 a year are slightly more pessimistic about the future than they were in January.

How much credit the rigger and other newly optimistic citizens are giving to Reagan is another question. On the favorable side, Reagan has stopped a slide in his overall popularity rating. Forty-five percent in the new poll said they approve his handling of the presidency and 50 percent said they disapprove. In January, 42 percent said they approved and 54 percent said they disapproved.

Reagan has also registered slight gains in approval of his handling of the economy and unemployment. He continues to be seen as a strong, sincere leader. A majority gives him credit for cutting waste in government, and by lopsided numbers people see him as an honest man who sticks to his principles.

At the same time, Americans may be more troubled by Reagan's policies now than at any time since his election. By 2 to 1, people say they view him as "a rich man's president." He is seen as unfair to the poor and the middle class.

Despite his role in working out a proposed bipartisan bail-out program for the Social Security system, Reagan is criticized as much as ever for his handling of that extremely sensitive political issue. Sixty-four percent say they disapprove of Reagan's handling of Social Security; 28 percent say they approve.

Similarly, by 53 to 38 percent, citizens are critical of Reagan's handling of the military budget; by 58 to 38 they disapprove of his handling of tax cuts, and, by a striking 64 to 31 percent, they disapprove of his handling of cuts in social programs.

More telling politically, the submarine rigger, an independent voter who says he voted for Reagan in 1980, does not support the president for reelection, choosing instead any of five prospective Democratic nominees mentioned in the poll.

Nationally, despite the surge in optimism over the economic outlook, Reagan does worse against the leading Democratic candidates in poll trial heats now than he did in January. He trails former vice president Walter F. Mondale by 48 to 39 percent, compared with 44 to 42 percent earlier.

Reagan is behind Sen. John Glenn (D-Ohio) by 46 to 38 percent. In January the president trailed Glenn by 44 to 41.

As in past surveys, another political quirk, the gender gap, continues apace. In areas where Reagan has picked up support it is because men have been moving toward him, not women.