The leaders of Egypt and Israel met on the banks of the Suez Canal Sunday to draft a joint set of guidelines for peace agreements that would end three decades of hostility in the Middle East.

President Anwar Sadat and Prime Minister Menahem Begin immediately agreed to bring their foreign and defense ministers into long-range negotiations and were said to be making good progress on the joint declaration.

By early afternoon on Christmas Day, it was announced that Begin would extend his visit to Egypt for a day - an indication that the two leaders have moved beyond the symbolism of their first meeting in Jerusalem last month into the substantive problems of making peace.

After their first 70-minute meeting, Begin called the initial accords "the first step in a comprehensive peace settlement." Sadat said, "Praise be to Allah that we have started by giving a push forward even before the end of the (Ismailia) talks."

The two leaders met again for 150 minutes at a pink brick villa near the canal and both reported that the talks are going well without providing any details.

After a long working lunch attended by Sadat, Begin and members of their delegations, an official. Egyptian spokesman announced that Begin would prolong his visit into Monday. The scheduled Sunday afternoon press conference was put off until Monday morning - a move that officials on both sides said was an indication that substantive issues were being decided.

Emerging after their evening session, a smiling Begin told reporters, "We have good hope to reach agreement." Sadat added, "I quite agree."

Spokesmen for both sides indicated Sunday night that the two sides would be able to agree on the wording of the joint declaration on a comprehensive Middle East settlement.

Begin flew Sunday morning to an Egyptian military airport near here accompanied by his defense minister, Ezer Weizman, and his foreign minister, Moshe Dayan.

In the course of day-long talks, Begin and Sadat often stepped out of the conference room to talk privately, according to Zeev Chafetz, and official Israeli spokesman.

The two sides began by exchanging texts of a proposed joint declaration of intent as the basis on which the two countries would seek peace.

The two leaders needed less than half an hour of private talks to agree on the establishment of working committees to discuss the military and political aspects of the peace negotiations, which are understood to deal with the West Bank of the Jordan as well as the Sinai Peninsula.

One of these committees will meet in Cairo, the other in Jerusalem.

Professions of optimism aside, both sides also appear to have confronted a realization that negotiations have now entered into a phase that goes beyond the symbolizm and psychology of Sadat's journey to Jerusalem and into hard discussions of the differences that still separate their concepts of peace.

With little hard information on the substance of the talks, the most difficult issue was expected to be the fate of the West bank of the Jordan.

In simplest terms, Israel would like to keep control over the West Bank and Egypt would like a complete Israeli pullout. The question is whether they can find a common meeting ground that will satisfy not only them but the rest of the Arab world as well. The West Bank also involves the thorniest of the Middle East disputes, that of the Palestinians.

Before leaving Israel, Begin said he would be bringing specific proposals for a peace settlement. He said they have been endorsed by resident Carter, who telephoned Begin and Sadat to offer his encouragement.

The Egyptians have been expecting Begin to offer a plan for the return of the Sinai Peninsula to Egyptian control and a more vaguely-worded outline of his ideas about the future of the West Bank.

Despite Begin's comments about the search for a comprehensive settlement - Middle East jargon for a peace accord not just between Israel and Egypt but between Israel and all her neighbors - there were signs Sunday that Israelis may be pressuring for a straight bilateral deal.

In his departure statement, Begin said, "I think peace is now possible between the people of Israel and the people of Egypt." It is this kind of remark that encourages criticism from the other Arabs that a bilateral accord may be in the making thinly disguised by incorporating declarations about an eventual broader agreement.

Sadat said that there was "still much to discuss and to do before peace is achieved" and that the bilateral working committees are to be the forum for that work.

An Israeli spokesman termed the bilateral committees "a direct organic continuation" of the official preparatory peace talks that opened in Cairo Dec. 14 and are now in limbo. By bringing in Dayan and the new Egyptian foreign minister, Mohammed Ibrahim Kamel, the Cairo talks have been upgraded from the technical to the ministerial level.

Kamel told the official Middle East News Agency that the higher-level talks will probably begin after Jan. 1. When the military committee, including Weizman and Egyptian War Minister Mohammed Abdel Gamassy, will meet was not disclosed.

As the marathon session continued deep into Sunday night, the talks were described as detailed and extremely cordial. The overnight extension was described by sources as an indication that Begin and Sadat and their colleagues both enjoyed their meeting and had found more to discuss than either side had anticipated.

Earlier Sunday, Dayan said in an interview with Egyptian television: "If I had been hearing about what has been happening today or reading about it, I would have thought it was a dream.

"Now I see it happening and with my own eye and I think it is a great event. After the steps taken by your president in coming to Jerusalem, the Middle East will never again be what it was before."

On the substantive side, it was disclosed by Egyptian officials that the question of Golan Heights had come up during Sunday's session. No details were revealed.

The only disagreement reported by aides concerned a Sadat remark.

The Egyptian leader referred to the late Israeli Prime Minister David Ben Gurion as having attempted to "force peace on the Arabs." Begin, who was a bitter enemy of Ben Gurion, rose to his former political foe's defense by asserting that "he never tried to force peace on anyone."

Late Sunday, the summit was interrupted by a phone call from Carter. Aides reported that the line was very poor and that neither Sadat nor Begin could hear clearly.Carter later was reported to have said: "I send my best wishes and support. The world awaits the peace you can give us this Christmas Day."