SOMETIMES DOING nothing is the most effective way to get something done. That seems to be lesson from the United States' recent experience in the Mideast.

A policy of doing nothing has proven highly successful -- pushing Arab leaders into diplomatic action, mitigating the damage done by last year's hasty withdrawal from Lebanon, even provoking some modest progress on the Palestinian problem.

Do-nothingism began to evolve accidentally after the Arabs and Israelis made mincemeat of the Reagan administration's go at playing an activist role in their sand box.

When both sides rejected President Reagan's Sept. 1, 1982 peace initiative, he and his new secretary of state, George P. Shultz, felt they had been badly let down. Shultz suffered an even greater disappointment the following spring. Syrian President Hafez Assad, infuriated by what he viewed as Shultz's treatment of him as a bit-player during the secretary's efforts to forge a Lebanese-Israeli peace accord, vowed to destroy the agreement -- and he did.

Assad's rage at the United States led at least indirectly to a tragedy that was the beginning of the end for Shultz's Middle East policy -- the October 1983 bombing of the U.S. Marine barracks at Beirut airport.

The total collapse of the Shultz policy came at American hands in February 1984. Shultz had been gamely trying to hold on in Beirut, arguing that it would be against the national interest if the United States were to be perceived as a quitter. But the president's closest advisers were more concerned about losing the approaching election than Lebanon, and they were aided by the Pentagon's insistence that the U.S. position in Beirut was militarily untenable.

The president's political men began looking for an opportunity to blindside Shultz and get the Marines out. Their bloodless coup came in Feburary 1984. John Hughes was then assistant secretary of state for public affairs and very close to George Shultz. He recently reminesced about what happened in the Christian Science Monitor: "With the president on the West Coast and Shultz in Grenada . . . the decision was taken in Washington to pull the Marines out. Later the Syrians expressed private incredulity that the Americans had withdrawn without getting any concessions for it."

So did George Shultz. Aides described him as embittered, quite naturally furious with the bumptious Syrians who were, after all, the losers of the war. But he also took a dim view of those moderate Arab "friends," chiefly the Jordanians and Saudis, who had let him, and the United States, down.

So Secretary Shultz, and with him U.S. foreign policy, began to give the Arabs the cold shoulder and Israel a warm embrace. The only problem this change caused the Israelis was the effort they had to make to conceal their delight and not say "We told you so" as they permitted themselves to be romanced into a strategic cooperation agreement with the United States.

The Arabs, on the other hand, had been consigned to a diplomatic Coventry. The worst job at the State Department had become that of Mideast envoy; it was a way of being ungainfully employed. Don Rumsfeld went back to Chicago and private life, as had Phil Habib and Larry Silberman; the last envoy, Richard Fairbanks, segued to Asia-watching.

The policy of doing nothing in the Middle East had become an established, if unannounced, fact. "Shultz put them all on hold," said one official. "He figured, the hell with them . . . that if they did not like American policy they should try to come up with one themselves."

Shultz resumed his global travels, but he scratched the Middle East off his map. He has not visited an Arab country since December 1983, and still has no plans to return to the region. No one has ever accused George Shultz of forgetting a slight to the United States.

For a time Arab leaders did not realize that the United States had given top priority to doing nothing. After all, Assistant Secretary Richard Murphy became the Middle East's most frequent flyer, spending what seemed like endless -- if uneventful -- weeks in Amman, Damascus, Beirut and Riyadh.

Finally, the Arabs began to suspect that the United States was practicing the fine art of wheel- spinning. Referring to Murphy's travels, one experienced Arab ambassador in Washington said: "It really is infuriating. He comes to us and asks us all sorts of questions and wants to know our opinion of this and that. And then he tells us what he was told by this one or that. And then he goes away and nothing ever comes of it. Nothing ever happens. What are you Americans up to?"

The United States was, it turns out, up to nothing. And when this was dimly perceived in the Arab world, movement that had been glacial suddenly turned supersonic.

"Quite by accident," said an Israeli official, "you drove the Arabs crazy. You hit their weak point. They equate being ignored with mortal danger. They are afraid of a Middle East without the United States playing an active role because they know it would give the Soviets too much power over them, and would encourage their own domestic crazies they have to control. You forced them into action."

And so they have been active.

Jordan's King Hussein emerged from his funk and re-established diplomatic relations with Egypt. He then turned around and appeared to reach agreement with the PLO's Yasser Arafat on an approach to Israel.

Egypt agreed to start talking to Israel again and hinted that better relations are just around the corner. Syria moved to control the Iranian zanies in its midst, graciously agreed not to overthrow Lebanon's pro- western President Amin Gemayel and began to make discreet overtures to the United States. That other tough customer, Iraq, threw a bunch of terrorist gangs out of Baghdad and re-established full diplomatic relations with the United States.

Meanwhile several Arabian Prince Charmings came, or prepared to come, to Washington, hoping to re-awaken the American Sleeping Beauty's interest in the Middle East.

Last month King Fahd of Saudi Arabia came to town, spent a week, and got nothing, not even a promise of sophisticated (or unsophisticated) military equipment. But he went home delighted. Among his entourage there was relief that the United States was again willing at least to talk about the Middle East. "George Shultz was absolutely terrific," one Saudi aide said. "He is really interested in the Middle East."

In his wake there is, this week, Egypt's President Hosni Moubarak. Waiting in the wings is Algeria's President Chadli and several others are said to be planning a Washington haj. They may, however, be disappointed. The Arabs will have to do something meaningful this time in order to get the gun-shy Reagan administration to stop doing nothing.