President Reagan, responding in a television interview and a political speech to charges that his administration has favored the rich over the poor, said today that people sleeping on outdoor grates in cities are homeless "by choice."

Asked on ABC's "Good Morning, America" in an interview from the White House why "people across this country . . . say, 'Yes he is the nicest man and we like him but his policies are causing misery,' " Reagan responded that his administration is spending more on programs for the needy, health care and food stamps.

"What we have found in this country, and maybe we're more aware of it now," Reagan added, "is one problem that we've had, even in the best of times, and that is the people who are sleeping on the grates, the homeless who are homeless, you might say, by choice."

White House spokesman Anson Franklin said later that some studies show that as much as 25 percent of the homeless refuse help from government agencies. Reagan added in the television interview that the problem has been "aggravated" by new laws requiring some mental institutions to release disturbed persons when "they have no place to go."

Later today, in a speech here at a convention of concrete, gravel and stone producers, Reagan charged that political opponents who say his policies favor the rich are trying to appeal to "greed and envy."

"As the political rhetoric heats up," he said, "there will be those trying to appeal to greed and envy--make no mistake that that is what they are trying to do--who suggest our tax program favors the rich. This is the same anti-business, anti-success attitude that brought this country to the brink of economic disaster."

"The finger-pointers and hand-wringers of today were the policy makers of yesterday," Reagan said, "and they gave us economic stagnation and double-digit inflation. There was only one thing fair about their policies: they didn't discriminate, they made everyone miserable."

The estimated $30,000 to $35,000 cost of the presidential trip here was paid by the government rather than the Reagan-Bush '84 campaign. White House spokesman Larry Speakes said White House and campaign lawyers made a judgment that the trip was not political because "he doesn't have any 'reelect me' in the speech" and that it is "no different from speeches we've been making for three years." Ed Rollins, the Reagan-Bush campaign director, told the Cable News Network in an interview that the trip is "official business. It's not a partisan campaign trip . . . he's not asking anyone to vote for him. He's going on totally about his programs that have . . . worked."

In the "Good Morning, America" interview, Reagan branded the charge that he favors the rich as an "absolute falsehood." He contended that President Kennedy proposed tax cuts that offered more benefits for the rich than his do. In his speech here to 4,000 members of the International Concrete and Aggregates Industries, Reagan drew a sharp contrast between his critics' complaints about economic policies that favor the rich and their "distasteful" attitude toward the profit motive.

"I for one have no trouble with the profit motive," he said. "When people are free to work for themselves, they work longer and harder . . . it hasn't been perfect and our country has made mistakes but with freedom and the profit motive we have achieved greatness as a nation." Reagan said he rejected the proposition that supporting government programs for the poor is a form of charity. He said charity is a reflection of what an individual chooses to do with his or her money and not what one group feels the government should do with everyone's money.

The president said working people can see the beneficial results of his economic program in the rising rate of real wages and the record number of people now employed. He did not mention the 8.2 percent unemployment rate and said that, despite lower inflation and interest rates, much remains to be done.

"Turning the economy around was priority No. 1," he said. "Now we can turn to the equally difficult task of streamlining government, making it more efficient and responsive."

Among the unfinished work Reagan listed was the $180 billion budget deficit. But he got the most applause of the day when he told the convention that he will not raise taxes to reduce the deficit.