After a marathon, 24-hour meeting, the Israeli Cabinet declared a state of economic emergency today and imposed a new series of severe austerity measures, including an 18.8 percent currency devaluation, sharp cuts in government subsidies of basic commodities, and a three-month wage and price freeze.

Emerging bleary-eyed from a meeting that began Sunday morning, Prime Minister Shimon Peres told the nation this morning that Israel risked "total collapse" if it did not act now to stem its steady economic and financial decline.

"The cuts on which we have decided are very difficult; the measures we have taken are very harsh," Peres said in a statement on state-run Israeli radio following the meeting.

"But we didn't have time," he added. "Insofar as I understand the situation in the economy, the decisions were made at the last possible minute."

The Histadrut, Israel's national trade union federation, reacted to the economic program by calling a 24-hour general strike beginning at 6 a.m. Tuesday.

Yisrael Kessar, the Histadrut secretary general and a member of parliament from Peres' Labor Party, charged that some of the measures were illegal and would mean a one-third reduction in real income for Israeli workers during the next three months.

Cuts in government subsidies for such items as milk, bread, poultry and frozen meat went into effect this morning, bringing immediate price rises that ranged from 45 to 75 percent. The price of gasoline increased by 27 percent.

In addition, the government authorized a 17 percent increase in the prices of goods that are not subsidized. The austerity program also includes a projected $750 million cut in the government budget, to be achieved through cuts in government activities and social service payments, a 3 percent reduction in the public service work force and higher taxes.

The single most dramatic action to emerge from the all day and all night Cabinet meeting was the 18.8 percent devaluation of the national currency, the shekel. It meant that, overnight, the shekel's exchange rate value dropped from 1,262 to the dollar to 1,500.

Banks were opened today, but Israeli radio reported that many were refusing to handle dollar transactions. The Tel Aviv Stock Exchange was closed today for the second day in a row.

For Israelis who have become accustomed to regular cost-of-living pay increases that cushion the impact of the country's raging inflation rate, the next several months are likely to be particularly difficult.

The government voted to provide some compensation to workers for the immediate price rises and subsidy cuts, but there will be no cost-of-living payments beyond that during the three-month economic emergency. There were predictions today that the consumer price index may rise by 25 percent in July alone as a result of the price increases.

According to Israeli radio, goods and services will cost an average of 24 percent more as a result of the government action. Some of the steepest price rises were 82 percent for water, 53 percent for electricity and 40 percent for telephone and postal service.

After these price rises are implemented, the emergency program calls for a three-month wage and price freeze in the hope that the economy will stabilize.

This was the third time in less than a year that the national unity government has announced a new economic program in what so far has been a losing battle against Israel's economic decline.

When the government took power last September, inflation was running at an annual rate of more than 1,000 percent. It immediately imposed a wage and price freeze, cut government subsidies and pledged to reduce the government budget by $1 billion.

When the wage and price freeze expired, it was replaced by an agreement among the government, the Histadrut and the Israeli Manufacturers' Association calling for controlled wage and price increases.

But the promised government budget cuts, which most economists here say is the key to reversing Israel's economic decline, were not fully implemented. The government continued to pump money into the economy to cover its deficit. Through the first five months of this year, the consumer price index has risen by 70 percent, not significantly less than the inflation rate in early 1984, when there were no government controls.

Meanwhile, Israel's foreign currency reserves dropped below $2 billion in May, a dangerously low level that posed the most immediate threat of economic collapse. It was largely on the basis of its deteriorating foreign currency reserves position that Israel successfully convinced the Reagan administration and Congress earlier this year to provide an emergency $1.5 billion grant to the country.

In his radio statement, Peres said the Cabinet acted because of two large threats to the economy -- "the terrible danger from inflation, which was about to overflow beyond all bounds, and the decline in foreign currency."

Appealing for understanding and cooperation during the emergency period, the prime minister added:

"I would say to all of Israel's citizens that we are about to go through a very difficult period. But had we not done what we have, there would have been a risk of total collapse. Had we not done what we have, there would be no chance, in my opinion, of getting out of the inflationary spiral once and for all."

Opposition parties in Israel's parliament, the Knesset, criticized the new economic program as putting too much of a burden on wage earners. It remained to be seen how much resistance would be generated by the Histadrut beyond the planned one-day general strike.

Finance Minister Yitzhak Modai said he reacted with "surprise and sorrow" to the announcement of the strike, adding, "I hope this is a passing episode."

Modai also defended the austerity measures as unavoidable.

"If you want to recover, sometimes you have to undergo surgery, and we have nobody to operate on except the people of Israel," he said.

One reason the government budget has not been cut seriously despite frequent promises to do so is that it inevitably would lead to a sharp rise in unemployment because government workers, a major part of the work force, would lose their jobs. Israeli officials fear that large-scale unemployment would dry up immigration to Israel and could set off an exodus from the country.