The 95th Congress quit for good last night - the House at 6:46 and the Senate at 7:17 - after a tumultous round-the-clock adjournment session in which the energy and tax cut bills - its main preoccupation in the final weeks - were at last enacted into law.

All night Saturday and all day yesterday the House and the Senate stayed in session as groggy members voted on the most important legislation of the year. Then they went off for three weeks of campaigning before most of them stand for reelection.

Congress occasionally has worked through the final night of a session before, but usually it has conference committee and the two would stand in recess for long waiting periods

This time the legislators took final action on about two dozen major bills over which they had fussed all year and a long list of minor ones as well.

Passed in that final spasm, in addition to the tax cuts and energy legislation, were the Humphrey-Hawkins, airline deregulation and highway bills; bills to extend federal aid to education, housing aid and programs providing public service jobs; a bank "reform" bill and bills increasing veterans' pensions and college aid to middle-income families, and an 18-month extension of the Endangered Species Act.

Left behind to die were bills to create a Department of Education, hold down hospital costs, give tuition tax credits and set aside Alaska lands as wilderness or national parks. Also killed on a 194-to-177 vote in the House yesterday afternoon was a bill raising sugar price supports and sugar prices.

Also dead for lack of final action were bills to give airlines federal aid to help develop quieter engines and an extension of the countercyclical aid program to communities with high unemployment rates.

After 18 months of highly publicized efforts to put it together, President Carter's top-priority energy bill was passed in the early morning dark. After a Senate filibuster was broken and the tax part of the energy bill approved 60 to 17 at 1 a.m. yesterday, the House debated all five parts of the energy plan combined for four hours before sending them to the president by a vote of 231 to 168.

Congress badly mauled Carter's bill to try to save energy by taxes, incentives and regulation, but he called it an "important beginning" in the effort to reduce reliance on foreign oil.Rep. Joseph L. Fisher (D-Va.) was the only area member to support it in its final form. The others opposed it for tear phased deregulation of natural gas will raise prices too far.

Carter had praise for Congress yesterday, and especially for the energy vote, which he said "declared to ourselves and the world our intent to control our use of energy, and thereby to control our own destiny as a nation."

Republicans for their part, claimed credit for having led the Democrats to cut taxes more than they would have if left to themselves. "We've got a Democratic president singing a Republican song," said Senate Minority Leader Howard H. Baker Jr. (R-Tenn.).

The House approved the tax bill yesterday by 337 to 38 after the Senate had blessed it 72 to 3.

In other actions:

The Humphrey-Hawkins 'full-employment" bill was expected to sail through Congress as a monument to the late senator Hubert H. Humphrey (D-Minn.) but after it passed the House in March it bogged down in the Senate. The weekend version the House sent to Carter yesterday sets national goals of four percent unemployment and 3 percent inflation in five years.

Bucking the 45-year trend of more federal regulation, Congress decided in an effort to make the airline industry more competitive to phase out federal regulation of raises and routes.

An 18-month extension of the Endangered Species Act was passed that includes a review procedure for exempting public works projects threatening endangered species. It provides a special expedited review process for the Tellico Dam, whose construction was ordered halted by the Supreme Court because it would cause the extinction of a three-inch fish called the snail darter.

Congress ended a two-decade fight by declaring the million-acre Boundary Waters Canoe Area in Minnesota on the Canadian border, a wilderness area, banning logging and mining and restricting use of motorboats and snowmobiles.

Federal regulatory agencies were given more power to police banking practices such as insider loans and other preferential treatment to bankers that were spotlighted by the investigation and hearings that led to the resignation of Carter's close friend Bert Lance as director of the Office of Management and Budget.

A Supreme Court decision was reversed by a bill requiring that employers with sick-pay programs for workers must include maternity benefits, but need not pay for abortions.

Congress miraculously avoided the usual drawn-out fight over use of federal funds for abortion as the House simply approved the compromise restrictions placed in the Health, Education and Welfare appropriation bill by a vote of 198 to 195 and sent it to the president.

Congress did not settle the public works budget that Carter vetoed but a stopgap funding resolution cut out 11 water projects, costing $1.5 billion that he opposed. This also kept alive the Department of Energy, whose annual authorizing legislation has not passed.

The House defeat, 177 to 194, of a bill supporting domestic sugar prices at 15.7 cents a pound, between the 13-cent world price and the 17 cents domestic producers wanted, was a loss for Senate Finance Committee Chairman Russell R. Long (D-La.), who comes from a sugar state and had guided the bill through the Senate. Killed with the sugar bill was a provision Carter badly wanted - extending until after Congress returns his authority to waive requirements that he raise tariff barriers against foreign goods flooding this country.

Congress killed the tuition tax credit bill that Carter threatened to veto, but approved his counterproposal for college aid to middle-income families by increasing the income limit eligible for federal aid from $15,000 to $26,000.

Multibillion-dollar federal aid programs that had been so difficult to get started at low funding levels a few years ago sailed through to final passage with only brief debate and often no roll-call votes required. A five-year extension of aid to elementary and secondary schools will cost $50 billion. The public service jobs program was extended for four years and is expected to provide 660,000 jobs next year at a cost of $11 billion.

A bill extending housing-aid programs that had been held up by House insistence that Congress be given a one-house veto over federal regulations was cleared when the House gave in on the veto.

For years the highway building lobby managed to prevent mass transit from getting its hands into the till of the highway trust fund. But yesterday the House sent Carter a $51 billion highway-transit authorization bill that Rep. James J. Howard (D-N.J.), its chief sponsor, called "the first total surface transportation bill."

A $1.9 billion authorization bill for operation of the Justice Department cleared after Congress dropped a prohibition against use of funds to participate in court suits to order school busing. COngress also for the first time passed a bill setting limits on the size of the White House staff.

An increase in veterans pensions was voted after the budget-busing billion-dollar bill was cut in half.

A meat import quota bill that rise automatically in times of low domestic production, and go down, but not lower than 1.2 billion pounds a year, was sent to the president, but he may veto it. The House also sent Carter a bill aimed at increasing overseas sales of U.S. agricultural products by authorzing new promotion and credit programs.

As it final act of business before Congress adjourned until Jan. 15, the House sent Carter a bill forbidding the granting of any tariff concessions on textiles at trade talks in Geneva. Carter has said he will veto it.

At the end, Senate Majority Leader Robert C. Byrd (D-W.Va.) looked back over the session with issues faced such as the Panama Canal treaties and a first major try at promoting energy conservation and gave Congress a mark of "A". He said he would not remember a Congress that dealt with more difficult issues during his 26 years in Congress.

On the other hand, Sen. George McGovern (D-S.D.) said on "Meet the Press" (NBC, WRC) that he could not remember a Congress that "has done less for the working person in this country."