Led by some of its most illustrious economizers, the Senate yesterday executed a spectacular back-flip and restored $572.1 million for revenue sharing to the fiscal 1980 budget.

The result -- unless the economizers find other unlikely items to cut -- would send the 1980 budget about half a billion dollars over the $572.6 billion spending ceiling adopted only two weeks ago.

But then, after hours of jousting and posturing over senatorial integrity and fiscal commitments, the Senate worked itself into an even more contorted position.

By a 43-to-39 vote, the senators voted to table a motion by Sen. Lowell P. Weicker Jr. (R-Conn.) that would have waived the budget ceiling and set it at a new level exactly $572.1 million higher.

The effect of the vote, coming about 9:30 p.m., was to leave the Senate with the uncomfortable task of finding other ways to trim spending to stay within its old ceiling.

Appeals by Budget Chairman Ernest F. Hollings (D-S.C) and Joseph R. Biden Jr. (D-Del.) to their colleagues to adhere to the discipline of the budgetary process, even at the cost of losing money for other pet projects, touched enough politically sensitive nerves.

But among the 43 touched senators was only one Republican, Henry Bellmon of Oklahoma, ranking GOP member of the Budget Committee. Thirty-one of his ostensibly economy-minded GOP colleagues voted against him.

The action came as the Senate plowed through the day and into the night on a $15.9 billion supplemental appropriations bill loaded with election-year goodies.

In this year of fervent drumbeating about balancing the budget and restraining spending, the four-star spectacular on revenue sharing seemed a little like a drunk taking one last nip before climbing onto the wagon.

The key 55-to-36 vote on revenue sharing came on a challenge raised by Weicker, who argued that the Appropriations Committee had acted illegally by striking the $752.1 million from its supplemental bill.

With 48 states believed to have financal surpluses this year and with the administration proposing to end revenue sharing in 1981, the committee decided to lop in half the final payments due next week.

That action had sent governors and state officials into a frenzy of protests across Capitol Hill. They contended that by ending the payments, Congress would be reneging on a promise.

Their arguments found sympathetic ears throughout the Senate. A horde of members who routinely denounce federal spending joined Weicker to negate the committee's rescission of the revenue-sharing money.

The House-passed version of the supplemental appropriations bill contains the full amount of revenue-sharing money that state officials are counting on. Had the Senate rescission stood, it would have become one of more than 250 items on which the House and Senate measures are in disagreement.

The pro-Weicker vote drew an emotional attack from Sen. Howard M. Metzenbaum (D-Ohio), who began by reading names of fiscal conservatives who joined in the budget-busting vote. "Armstrong, Domenici, Garn, Hatch, Hayakawa, Helms, Humphrey," he intoned from the roster of economizers who went along with Weicker.

"Those who make the most noise in the Budget Committee voted for this. It lookes a roll call of the most conservative members of Congress . . .. Those who make the best speeches, what side are they on? They are on the side of $572 million -- balance the budget if it doesn't hurt my state," Metzenbaum said.

Sen. James A. McClure (R-Idaho), one of those on Metzenbaum's dishonor roll, leaped to his feet to admonish the Ohioan and say that other ways would be found to keep the supplemental bill within the 1980 ceiling.

Sen. Dale Bumpers (D-Ark.), another who voted to overrule the Appropriations Committee, put a conciliatory seal on the exchange by cautioning that "nobody here ought to be pious."

The extension of that cautionary note was that the bill -- the largest supplemental measure in Senate history -- contained something for nearly everyone, everywhere, all deemed necessary to get the government through this fiscal year.

Repeated asides were made by senators noting that the measure appropriated $952.1 million for disaster and recovery work related to the eruption of Mount St. Helens in southwest Washington.

The volcano, of course, is in the home state of Warren G. Magnuson (D), the Appropriations chairman, who was able to persuade his colleagues to add $134.7 million more than President Carter sought and $118.1 million more than the House allowed.

Some suggested that the poor and sick, whose welfare across the country might depend on continuation of revenue-sharing funds, were being sacrificed to Magnuson's concern at home in a reelection year.

But there was something even for departing members -- an example being a $9.7 million appropriation for the Garrison Diversion Project, an irrigation system of lakes and canals in North Dakota.

Critics of the controversial project, which has drawn strong protests from Canada and U.S. environmentalists, call Garrison "a linear Taj Mahal dedicated to Milton Young."

Young, senior Republican on the committee, is retiring at the end of this term and was the leader in insisting that the project be funed. Efforts by Sen. Larry Pressler (R-S.D.) to delete the money failed.

The bill also provides, among other things, an added $45.3 million federal payment to the District of Columbia, less than the $61.2 million sought by Mayor Marion Barry but more than the $28.8 million granted by the House. The measure also would cancel $20 million in previously authorized construction projects that were dropped by Barry in an effort to win a larger federal payment. No similar provision is in the House version.