The surprising turn of recent diplomacy in the Middle East works to diminish the role of the United States in the area. By a kind of reflex attitude, the Carter administration is as one American diplomat in Israel put it, "scrambling to get back in the game."

A far more sensible tactic, in fact, would be to stay out of the game for a while. From the sidelines, Washington can help Israel, Egypt and other Arab states achieve a much better agreement - a kind of pro-Western peace - than anybody dreamed was possible.

The surprising turn, of course, began with President Anwar Sadat's visit here and continued with his invitation last Saturday to Israel and other parties to attend a pre-Geneva peace conference in Cairo. Sadat's direct address to the Israelis departed from previous diplomacy in twoways that bear against Washington's influence.

For one thing, Sadat had previously relied entirely on the United States to deliver Israel acceptance of peace terms. Now, he is saying that Egypt has to make a direct approach to Israel - which is one down for the United States.

Moreover, the Carter administration had aimed for a comprehensive settlement at a Geneva conference including Syria and elements of the Palestine Liberation Organization. To bring the Syrian in, Washington arranged a joint call to a Geneva conference with Sadat's great enemy, the Soviet Union. By going direct to Israel, Sadat short-circuited the American plan and the prime roles assigned in it to Syria, the PLO and the Russians.

President Carter has tried to pretend that he is right in the thick of all the action. The White House has let the world know about his role in helping Sadat and Israeli Prime Minister Menahem Begin get together. The Presidenin an interview with Pierre Salinger, insisted that nothing had changed. "I think," he said,"that the visit by Sadat to Israel is a step toward a comprehensive agreement at Geneva." In fact what is now emerging is different and better than "a comprehensive agreement."

The settlement toward which the Sadat diplomacy points has at its heart an understanding between Israel and Egypt. The Israelis would relinquish all lands seized from Egypt in return for an agreement on non-belligerency.

In fact, King Hussein of Jordan and some Palestinians (though clearly not the radical wing of the PLO) would also come into the deal. In return for accepting the existence of Israel, they would receive a steadily growing role in the territory west of the Jordan River, where most Palestinians live and which Israel seized from Hussein in the Six Day War of 1967.

Other parties - notably Syria, the radicals in the PLO and the Russians - would come into the deal only if they came in on Cairo's terms. Which, on present form, seems distinctly unlikely.

To put the deal together,however, Sadat needs help from the United States. Washington can persuade Saudi Arabia and the other oil states of the Persian Gulf that pay most of Egypt's bills not to oppose the agreement. It can encourage Hussein to get into the game, despite pressure from Syria and the PLO. It can also push Begin to make the territorial concessions on the West Bank necessary to give Hussein and the moderate Palestinians an incentive for playing ball with Sadat.

Some cost to the United States, is involved. Washington will not be loved by Syria or the PLO or any of the radical Arabs for backing Sadat at this juncture. It is all the more reason for staying in the background.

But that cost is far outweighed by the benefits that would accrue if the approach just described can be made to work. The upshot would be a Middle East freed from the greatest war threat - the Israeli-Arab confrontation. The rich pro-Western countries, embodying the great preponderance of military and economic power, would be part of the deal. The Russians and their friends in the PLO and the radical Arab states would be on the outside looking in.

With such an outcome, there would be plenty of credit for all parties. If President Sadat collected the lion's share, and Prime Minister Begin a modicum, honors in the United States would go to the only person who always benefitsmost when matters go well abroad: the President.