The Japanese government has revived a plan, once rejected by the United States, to buy large supplies of the Alaskan crude oil that is producing a glut in the American West Coast markets.

Prime Minister Takeo Fukuda has instructed officials to come up with details for an arrangement that would permit Japan to exchange some of the oil it buys from the Middle East for Alaskan oil.

He reportedly was encouraged during his recent trip to Washington to believe that the U.S. government might look more favorably on such an arrangement than it did last year.

Present American law prohibts foreign sales of the Alaskan oil to any country except Canada and Mexico. If Congress did not object, however, President Carter could waive that restriction to serve the national interest.

Last summer, the Carter considered such a swap but eventually turned it down. One reason was a fear that the public would not take a national energy conservation program seriously if supposedly precious domestic oil was to be sold overseas.

japanese officials this week referred to two changes that have taken place since last July, when the swap was turned down by Carter.

The United States at that time still counted on using all of the 1.2 million barrels of oil flowing daily from the Alaskan pipeline, which carries it from Prudhoe Bay to a southern port for shipment to California. Now, however, there is a glut of oil on the West Coast and it is expected to continue for some time.

Secondly, Japan is now under stronger U.S. pressure to reduce its trade surplus that runs over $8 billion with the United States alone. A big oil purchase could substantially reduce the surplus. Although the United States is more interested in seeing Japan import manufactured goods, not raw materials, the oil deal would at least make the trade books look better.

Japanese sources said Fukuda raised the possibility with Carter at their meeting in the White House on May 3. Some reports have described Carter's reaction as favorable, but one source said yesterday Carter was merely "neutral," indicating only that he would consider the suggestion again.

Fukuda also was encouraged, the official said, when American congressmen raised the possibility of an oil swap during his meetings with in the Capitol.

Japanese officials have been cautious about raising the issue because they realize it touches some sensitive political nerves in Washington.

"If America thinks it can do this politically, I am sure we could accommodate that wish, one high-ranking official said. He described the West Coast oil glut as "a pity."

Japan's proposal to send some of the Middle East oil it normally buys directly to the United States in exchange for Alaskan oil shipped to Japanese ports.The government calculates that both countries could save on transportation costs. The Middle Eastern oil would go directly to U.S. ports on the East Coast, where it is most needed.

At the present time, Japan is not suffering from an oil shortage but it is always eager to locate new supply sources, such as Alaska. Even before the Alaska swap plan was revived, the government was considering stockpiling oil in tankers off the southern coast of Japan, both to assure a supply for emergencies and to reduce its trade surplus.

Fukuda has told the Ministry of International Trade and Industry to prepare details of an oil swap plan. No estimates of the amount of oil have been made public, although some Japanese publications have suggested that Japan may want to obtain 180 million barrels a year.

The Fukuda administration is reportedly eager to send a working-level delegation to Washington within a month to discuss the plan with American officials.