Sen. Roger W. Jepsen (R-Iowa), not known for his foreign policy expertise, nevertheless made a foreign policy splash in May when he told a pro-Israeli audience that he was unshakably opposed to the Reagan administration's proposed arms sale to Saudi Arabia.

"This sale to an unstable country jeopardizes the security of our most advanced technology . . . . This sale undermines the security of Israel . . . . I pledge my efforts and my vote to block this sale," the conservative freshman said.

That was his position until yesterday, when Jepsen made an even bigger splash. He announced that he had changed his mind, and in so doing may have turned the tide for President Reagan in the president's effort to win Senate approval of the $8.5 billion arms deal.

Jepsen announced that now, after a long weekend of discussion with his pro-Israeli wife, he will support the sale of the high-technology Airborne Warning and Control System (AWACS) planes and other armaments to Saudi Arabia.

His announcement stunned both the Israeli lobby and Senate opponents of the deal, but it thoroughly charmed the White House, where one high-level presidential aide said, "A lot of hard work has gone into that one."

But what really turned Roger Jepsen? A line that quickly ricocheted around the Senate, reflecting on his lack of bargaining experience, held that the White House had promised to base the much-traveled MX missile system in Iowa.

Jepsen said a belief that he should support his president on a vital foreign policy issue was central in changing his mind. Another White House aide put it this way:

"The Lord smiled."

Jepsen's last visit to the White House to discuss the arms deal had occurred a week earlier, but the impact of the president's personal appeal on Jepsen, as well as on others who have come over to the administration's side in recent days, was clear.

In a tactic approved by the White House senior staff, Reagan has been seeing senators alone, one-on-one as they say, during the last two days in the study he uses in the residential quarters of the presidential mansion.

Another weapon used by the administration, an unsolicited letter of support from former Senate majority leader Mike Mansfield of Montana, a Democrat and now U.S. ambassador to Japan, also played a part in winning hearts and minds.

One of the "undecideds," Sen. John Melcher (D-Mont.), pledged his vote for sale of the AWACS yesterday after seeing the letter from his old friend and colleague. "The letter was a factor, but it was not pivotal," Melcher said.

Like others, Melcher had been the object of intense White House attention during the last three weeks: calls from the president (including one Monday), a visit to the White House and personal lobbying on the part of chief of legislative liaison Max Friedersdorf and Richard V. Allen, the president's national security affairs adviser and designated point man on the sale.

That same presidential magic worked on another farm-state Democrat, Sen. J. James Exon of Nebraska, who took the floor of the Senate to detail all the reasons why the sale should not go forward, then announced that he would support it, essentially because he felt that Reagan should be free to direct foreign policy.

But even after announcing his decision, Exon was critical of Reagan's "playing politics" over the sale. And he faulted the president for not consulting more thoroughly with congressional leaders on the issue.

But Exon beamed as he reported that a telephone call from Reagan awaited him as he returned from making his floor statement yesterday afternoon. As for pressures, he said, he didn't feel that many. He had contact with Reagan and he had calls from former president Gerald R. Ford and former vice president Walter F. Mondale. "I mumbled sympathetic words to both of them," he said.

But there was pressure, and Sen. Howell Heflin (D-Ala.), aligned against the sale, said he'd felt so much that "at night I'm wondering whether or not I'm gonna have an arm transplant, it's been twisted one way and twisted the other." Alabama business interests that stand to benefit from the sale have urged him to support Reagan.

Throughout this debate, there have been fleeting Biblical allusions, and it was Heflin last week, after emerging from a session with Reagan, who said they had talked about "Armagiddian," which is how the last great decisive battle between good and evil comes through his Alabama drawl.

That, from Revelations, also played a part in Jepsen's decision earlier in the year to put himself strongly on the side of Israel and against the arms deal. Jepsen, 53, a former insurance man and Iowa lieutenant governor, said he and his wife were led to support Israel partly by their fundamentalist Christian views and faith in Biblical admonitions.

In a recent interview with The Des Moines Register, after his rousing speech of support before the American Israel Public Affairs Committee, Jepsen said his wife's ideas had been instrumental in forming his thoughts on Middle East policy matters.

Because of her interpretations of the Bible, he said, Mrs. Jepsen was even able to describe in advance the Middle East boundaries that would emerge from the Camp David accords between Israel and Egypt. The senator did not explain yesterday how his change of heart on the AWACS squared with his earlier opinions.

But he said he had "spent all weekend" discussing his decision with Mrs. Jepsen, whom he described as "very committed to Israel." In the end, he said, it was simple: "I've changed my mind."