A federal court judge here ruled yesterday that it is unconstitutional for the president to defer spending appropriated funds, and he ordered the release of more than $5 billion in housing funds.

The decision by U.S. District Court Judge Thomas P. Jackson strips President Reagan of his authority to defer approved spending from one fiscal year to the next, a major tool he has used to reduce the budget deficit. Jackson said presidential use of the deferral tool has been tantamount to a "line-item veto."

While $5 billion in housing funds was the direct issue involved in the suit, a total of $22.8 billion involving 41 programs is currently deferred by the Reagan administration and could be affected if the judge's ruling is upheld.

A spokesman for the Justice Department said lawyers there will have to study the decision before deciding whether to appeal.

"We think it is an important decision because it restores balance in the appropriations process," said David Vladeck, an attorney with the Public Citizen Litigation Group, which filed suit on behalf of the National League of Cities, four Democratic members of the House and city officials.

"It was my view from the beginning that this was where the Constitution leads," said Rep. Bruce A. Morrison (D-Conn.), one of the congressmen who brought the suit.

Jackson struck down the deferral section of the 1974 Budget and Impoundment Control Act on the grounds that it would not have been passed without its provision that allowed a one-house veto of such deferrals. The Supreme Court ruled in 1983 that one-house vetoes are unconstitutional.

"If the deferrals had been upheld," Morrison said, "it would mean that Congress would have to appropriate anything twice that a president deferred. That's an absurd view, and I think the court finds it's absurd."

The president now will be able to defer spending for policy reasons only with the prior approval of both houses of Congress, according to Valdeck. He said about 150 such deferrals have been made in the past three years. "It may be inconvenient, but it's not unworkable," he said.

In opposing the suit, the government argued that the impoundment control provisions were passed primarily to provide Congress with additional information about planned impoundments.

Government attorneys also said the current deferrals are not the same as a line-item veto because the delays in spending are temporary and the funds are available for obligation before the end of the fiscal year.

"The argument ignores the practical realities of the budget process," Jackson wrote, " . . . for when the expenditure of funds is deferred for one year, those funds remain available and may be used to offset budgetary requirements for the following fiscal year."

Jackson's decision, which he stayed pending appeal, has the same effect as the recently passed House version of the fiscal 1986 supplemental appropriations bill, which also strips the president of the power to defer spending appropriated funds.

However, Reagan has threatened to veto the supplemental bill if it contains the anti-deferral measure. The Senate Appropriations Committee's version of the legislation would not alter deferral powers.

Rep. Jack Brooks (D-Tex.), the House Government Operations Committee chairman, said he hopes the court decision will persuade Reagan to "sit down with Congress to work out a new and constitutionally viable method of allowing the executive branch to defer funds for purposes of managing the federal government efficiently."