Egyptian hopes for an acceptable peace with Israel were revitalized yesterday like a critically ill patient saved by a miracle cure.

The doctor was President Carter, whose proposal of a summit conference of Egypt, Israel and the United States at Camp David Ind., next month was hailed by Egyptian officials as a breakthrough that changed the Middle East prognosis.

Foreign Ministry officials and other informed Egyptians who two days ago were talking gloomily of admitting that President Anwar Sadat's initiative had failed and of a face-saving formular for returning to the unified Arab fold found new hope in Carter's dramatic gesture.

The "framework" for peace that the White House announcement said would be the objective of the Camp David talks was seen by the Egyptians as equivalent to the "declaration of Principles" that they have sought for 50 many months.

Taking their cue from Sadat, they emphasized what they saw as the positive elements of Secretary of State Cyrus Vance's two days of talks in Alexandria this week, and refused to discuss the possible consequences of failure. One high-ranking official who took part in the Alexandria meetings even looked beyond Camp David and beyond a declaration of principles to "the next step, the cooperation of some of the other Arab countries."

Even though it appeared that Vance had nothing new to offer in terms of Israeli concessions on the issues, the American seizure of the initiative in itself was enough to cheer the Egyptians.

That is because the stated U.S. views on such issues as Israeli withdrawal from occupied Arab territory. Jewish settlements in the occupied lands and the Palestinian question are much closer to Egypt's positions than to Israel's. But Vance avoided any suggestion that the United States will try to impose these views on the Israelis, and this may mean that the latest maneuvering has only bought time, not actually moved matters closer to a resolution.

Still, Camp David summit has taken the Egyptians out of an uncomfortable situation that was partly of their own making, and Egyptian officials dwelt on this result of the Alexandria meeting, not on the difficulties ahead.

Sadat accepted Carter's invitation without demanding any prior concessions or policy changes from the Israelis, or any U.S. commitment to put pressure on Israel to change its position.

While Sadat consulted no one before accepting the invitation, Egyptian officials said they understood why he reacted so eagerly.

By announcing that he would take part in no more direct talks with Israel until the Israelis offered some concessions to his liking. Egyptian sources said, Sadat had forfeited some of his public relations gains and appeared to be inflexible instead of eager for peace.

Sadat's personal attacks on Israeli Prime Minister Menachem Begin and his apparent campaign to undermine Begin in his own country had backfired as Israelis rallied around their leader.

Led by Saudi Arabia, other Arab states were exerting mounting pressure on Sadat either to abandon his peace initiative as a failure or at least to change its format so that he could act in concert with Syria and Jordan.

And the peace initiative itself, nearly nine months after Sadat's trip to Jerusalem, had brought "no tangible results", as a knowledgeable Egyptian official out it.

In the context, it was not surprising that Sadat jumped at the invitation from Carter because it extricated him at least temporarily from the dead end he appeared to have run into.

He had been stung by American criticism of his performance after the foreign minister's meeting at Leeds Castle in England last month, but suddenly found the Americans offering him exactly what he had been seeking for some time - a fuller and more direct American role in the negotiations. He sees such American participation as the only hope for a break in Israel's determination to keep most of the West Bank.

Egyptian officials sought to minimize any suggestion that Sadat's acceptance of new talks without the prior Israeli concessions he had been asking indicates that he is inconsistent or erratic in his approach to the negotiations.

Carter's willingness to put his own influence on the line and American assurance that U.N. Security Council Resolution 242 would be the basis of the peace talks were enough of a new element to justify Sadat's return to the bargaining table, they said.

The American interpretation of 242 is that it requires nearly complete Israeli withdrawal from all of the territories occupied in the 1967 war. That nearly coincides with the Egyptian view, so if Carter is going to press for it, and for a solution of the Palestian question, Sadat will finally have gained the United States as an ally instead of just a sympathetic observer.

Whether the United States is actually going to enter the lists on Egypt's side remains doubtful, judging from the cautious assessment given by U.S. officials after the Alexandria talks.

The difficulties that may develop from the U.S. approach, however, are in the future. For the moment, the Egyptians feel they can count substantial gains from the Alexandria talks and the Carter invitation.#TBy emphasing commitment to a comprehensive regional settlement, the Egyptians believe, the United States should help Sadat scuttle Israeli hopes and Arab fears that Egypt is heading for a bilateral deal with Israel, abandoning the Palestinians.

Egyptian officials also said the Americans have finally understood that Sadat's refusal to bargain over the occupied territories or to consider territorial compromise is not a negotiating tactic but a fundamental principle that the Israeli will have to accept.

Whatever happens at Camp David, Sadat's personal status is at least temporarily enhanced. If the summit meeting succeeds, it is a success for his initiative. If it fails, it is an American failure.