Even though President Reagan was already assured a spectacular, come-from-behind victory, a suspenseful hush fell over the Senate yesterday as the drumbeat of the roll call began for the administration's proposed arms sale to Saudi Arabia.

With the galleries packed and overflowing into the corridors, no one seemed to mind that the outcome had already been decided hours before with the decision by two freshman Republican senators, Mark Andrews of North Dakota and William S. Cohen of Maine, to abandon their opposition to the deal and go along with their president.

Even without Sen. Russell B. Long (D-La.), who had been counted on to give President Reagan a clinching 50th vote, this meant Reagan had duplicated his earlier budget victories with a smashing follow-through in his first major foreign policy test in Congress.

But Congress watchers, from White House officials and senators' wives to tourists, were not to be deprived of Washington's version of suspense theater: those fairly rare occasions when close votes and high stakes combine to make the ordinarily monotonous reading of 100 names a matter of high drama.

In this case, the stakes were not just Middle East stability, the security of Israel and U.S. relations with oil-producing Arab countries, as was argued in the eight hours of largely tedious speechmaking preceding the vote.

The stakes also included a balance of power closer to home--between the White House and Congress, a subject that tends to rivet any Washington politician's attention.

Not only was the Senate talking about the "international prestige and powers" of the presidency abroad, as Senate Foreign Relations Committee Chairman Charles H. Percy (R-Ill.) put it in the debate. To some extent it was shaping Ronald Reagan's clout in future battles that include domestic as well as foreign problems of enormous scope.

For all practical purposes, the suspense was over seconds after the vote started at 5 p.m. when Andrews, who is second on the alphabetical list of senators, voted against the proposed resolution of disapproval for the arms sale as he had indicated privately, although not publicly, that he would do.

Then came Cohen's vote against the resolution, which had come with the greatest show of public reluctance and anguish--a kind of lesser of evils for Israel, as he had said in a floor speech earlier. Another freshman, Sen. Slade Gorton (R-Wash.), had switched publicly earlier in the day. Long, no longer pivotal, voted with the president, as did another Democrat, Sen. Edward Zorinsky (Neb.), who had met with Reagan earlier in the day.

But the tension was so thick that, aside from the roll call and responses to it, hardly a sound was heard until Sen. Malcolm Wallop (R-Wyo.) inadvertently voted for the resolution and set off an explosion of laughter when he hastened to change his vote.

After the vote was announced, 52 to 48, the chamber emptied as senator after senator came by to shake the hand of Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) who many credited with a major role in paving the way for Reagan's victory through painstaking stroking and cajoling of his colleagues.

"We came back from almost defeat to a pretty good win," a tired but beaming Baker told Reagan over the telephone shortly after the vote, "and you get most of the credit for it." He also credited some "good souls" in the Senate.

The day began like most others, just a little earlier. Before the session started at 8:45 a.m., Baker told reporters he was "frankly optimistic," emphasizing the word "frankly" for those who'd heard it all before, even when the numbers didn't add up.

The reason for Baker's optimism was that the numbers did finally add up: 48 solid votes for the president going into the final day, with strong indications that Long would provide the crucial 50th if one of several likely Republican prospects turned up as No. 49.

And 50 votes would defeat the sale's opponents because they needed 51 to win.

Only a few senators and a scattering of spectators gathered to hear the warm-up speeches and watch the floor being paced by Sen. Bob Packwood, the maverick Oregon Republican who had seen his once impressive list of Saudi sales foes shrivel under the impact of White House pressure. Packwood's grim face told the story far more eloquently than most of the speeches.

Sen. John Glenn (D-Ohio), not the slightest bit amused by stories of horse trading over the measure, said inducements had been offered--not by the president but "third-hand after some White House staff person asked someone to contact a senator"--that included pork-barrel projects. "The idea that seems to come out at this time is, 'Don't commit your vote early. Hold out for what you can get,' " said Glenn.

As the day wore on, the Senate floor and the galleries gradually filled. Vice President Bush arrived to preside and several top White House aides, including chief of staff James A. Baker III, peered out over the Senate from the second-floor gallery.

A Senate Republican leadership aide likened the campaign for the Saudi sale to a "ball that had to be patched over and over again just to keep it bouncing." As the vote approached, "We didn't have any room for any more patches."