After a long day of often emotional debate, the Senate voted 54 to 44 last night to approve President Carter's plan to sell warplanes simultaneously to Egypt, Israel and Saudi Arabia.

The Senate's action assures that the three arms sales will go through, since the law provides that they can only be blocked by joint action of the House and the Senate.

It was a vote both the administration and foes of the sale - particularly supporters of Israel - had said they never wanted, not least because it was the first outright defeat for Israel's supporters in Congress in modern times.

Many senators who voted for the president's "package deal" of warplane sales said publicly or privately yesterday that they did not feel they were voting against Israel, but for a complex U.S. national interest that values friendship with moderate Arabs as well as Israelis.

But both sides asserted during the debate that a vote against their position amounted to a slap in the face for Israel or Saudi Arabia and Egypt, depending on who was speaking. In effect, both sides ensured that the outcome would have a symbolic value that neither said it wanted.

Friends of Israel depicted Carter's package deal as an attempt to "teach the Israelis a lesson," but a majority of the Senate went ahead and supported Carter.

Carter warned that a vote against the package deal would mean the Senate wanted to "turn aside . . . those in the Middle East who work for moderation and peace . . . shattering their confidence in us." Yet 44 senators voted against the deal.

Many senators and their aides said they had agaonized over this vote, and there were dozens of explanations for individual decisions.

The Republic leader, Howard H. Baker Jr. (Tenn.), voted with the president, but also sharply criticized Carter's handling of the sales. Baker accused the president of ignoring the U.S. commitment to maintain the balance of military forces in the Mideast, and said the United States should now sell more warplanes than currently planned to Israel. Israel would get 15 F15s and 75 F16s included in the package deal, while Egypt would get 50 F5s and Saudi Arabia would get 60 F15s.

On the Democratic side, many of Carter's most reliable supporters on the issues abandoned the president on this vote. One of them was Sen. Edward M. Kennedy (D-Mass.), Carter's most loyal backer in the Senate.

Last night's vote was preceded by intensive lobbying. Numerous senators said they received telephone calls from the president or members of the cabinet.

Most senators' offices reported receiving large piles of letters, telegrams and mailgrams yesterday from opponents of the sales. The lobby outside the Senate cloakroom was filled yesterday with various interested parties, including lobbyists for the sales and opponents from several Jewish organizations.

Several senators publicly addressed the sensitive issue of the so-called "Jewish" or "Israeli" lobby, most of whose members had worked hard, first to persuade Carter not to go ahead with the sales, and then to block them when he did.

In February when the prospect of the package deal was first made known, this informal but powerful lobby was confident it had the votes to block the idea. Its officials said repeatedly in the weeks that followed that the White House would have to compromise, but apart from a promise to sell 20 more F-15s to Israel in the future and some Saudi assurances on the use of their planes, that compromise never came.

Sen. Mike Gravel (D-Alaska) made a blunt speech yesterday about pressure from Jewish constituents and supporters. He said he understood that this vote "is the litmus test" for many Jewish individuals and groups. "This vote, if it is not done properly, kisses away in the future all kinds of financial support . . ."

Gravel said: "I think this will be the watershed year of Jewish influence in this country," because senators had received so many ultimatums on this issue, and "when you deliver an ultimatum once you cannot deliver it twice or three times. When you are told 'This is it,' then you have to live with that situation."

Other senators and administration officials privately deplored these remarks. But some said Gravel spoke what others felt.

The plane sales provoked one of the most spirited and substantive debates heard on the Senate floor in a long time. The deep ideological divisions and predictable individual prejudices that so often make Senate floor debate irrelevant or tdious did not affact this question.

The issues were argued on several levels. Staunch supporters of Israel said it was a vote on the special relationship between the United States and Israel, and several saw it as an attempt to disrupt that relationship.

"The planes are not the issue," said Sen. Jacob K. Javits (R-N.Y.), who assailed the package deal. "Everybody'll get their planes . . . I think the president set out to teach the Israelis a lesson . . . What are you going to do Sap (the Israelis) vitality? Sap their morale? Cut their legs out from under them? That's the issue."

Sen. Clifford P. Case (R-NJ) also spoke emotionally against the sales. He said the United States has "almost imperceptibly" drifted into the position where its commitment to Israel is now no different than its commitment to other friends. Case deplored this, and said Israel was a special case.

"The question is not whether the president wins or the president loses" on this vote, Case said. "The question is whether democracy in the West - the United States - wins or loses."

Other senators drew the issue in more mundane terms, and perceived a clear choice based on short-term considerations. Sen. John C. Stennis (D-Miss.), for example, argued that Saudi control over one-fourth of the world's oil reservces made it necessary for the United States to try to help the Saudi government defend itself.

Sen. George McGovern (D-S.D.) saw a "psychological" factor: "The arms package now proposed will have little, if any, effect on the Arab-Israeli military equation . . . But the rejection of these sales after we have so generously supplied sophisticated arms to Israel for so many years would be viewed by the Arabs as giving the lie to the American insistence that we want the friendship, confidence and cooperation of the moderate Arab state . . ."

McGovern was one of many senators who said the Senate had to accept the package deal as a fact of life, not something whose wisdom could be debated fruitfully now. Others disagreed sharply.

Sen. Paul S. Sarbanes (D-Md.), for example, said there was "a question of skill and competence in the art of government," and he accused the Carter administration of failure in this regard. He urged rejection of the sales to provide time to come up with some "creative statesmanship" for the Middle East.

Sen. Joseph R. Biden Jr. (D-Del.) also refused to accept the package as a fait accompli. He deplored the administration's timing in submitting the sales now, and predicted there would be "no long-term negative effect on our relations with Saudi Arabia" if the Congress voted to delay the sales now.

How the Saudis would react became a central issue in the debate. Sen. Gary W. Hart (D-Colo.) pressed several opponents of the sales to explain how they thought the Saudi government would take a defeat on this issue now.

They all tried to assure him that the Saudis would see the vot as fair, since it affected Israel similarly. The administration - with direct help from Saudi officials and their paid lobbyists - has aruged for weeks that Saudi Arabia would be deeply offended by a defeat, and would quickly contract to buy advanced warplanes from France.

"Let's not be bedazzled by the fact that somebody's going to have their nose out of joint tomorrow," Javits pleaded. "You think they're going to lean on France for their security for the next five years? They're not crazy."

Hart said the attitude that another country had no choice but to side with the United States was one that had led his country into trouble in the past, and he could not accept it. The Saudis have pride, too, he said.

One senator who regarded his speech yesterday as extraordinarily important was Abraham A. Ribicoff (D-Conn.), traditionally a firm supporter of Israel, but on this issue a supporter of the administration's package proposals. Ribicoff arranged in advance that he would have 30 minutes to speak at 1:30 p.m. yesterday, and he rose at that hour to deliver a carefully prepared speech in a somber tone.

"A strong and secure Israel is in our national interest," Ribicoff said, "but a strong United States, militarily, economically and diplomatically, is also" in Israel's interest. To preserve the latter, he said, the Senate should approve the plane sales.

Ribicoff listed the precise dependency of major Western economies on Saudi oil, and said the Saudis' $60 billion in reserves were crucial to the Western economic system and the U.S. economy. He said the moderate Arabs needed U.S. support in the search for Mideast peace, and he defended the assurances Saudi Arabia has given the United States about using the F15s for defensive purposes.

Ribicoff also spoke at length during a secret, closed session that lasted for more than two hours yesterday afternoon. He presented classified material on Soviet and Cuban penetration in countries near Saudi Arabia, then made what listeners called a passionate statement on the diversity in America that makes the country strong. Ribicoff warned his colleagues against allowing "ethnic politics" to influence the country's foreign policy, sources said, and when he finished, Sen. James B. Allen (D-Ala.) rose to praise his "statesmanship." This provoke applause for Ribicoff from other members, an unusual gesture on the Senate floor.

The closed-door debate revealed that different senators had different views of who "the enemy" is, a source said. Some spoke of Soviet and Cuban incursions as the danger, and urged support for Saudi Arabia as a response to it. Opponents of the plane sales spoke of the Arab world as the enemy - specifically as Israel's enemy - and urged rejection of the sales.

(Last night a spokesman for Sen. Lowell P. Weicker Jr. (R-Conn.) telephoned a reporter to note that the closed session contained an exchange of statements that tended to support a controversial speech Weicker made last week accusing proponents of the administration's Mideast policy of blaming Jews for their difficulties.