Japan is beginning to relax the economic sanctions it imposed against the Soviet Union as part of the American-inspired punitive response to the Soviet invasion of Afghanistan.

The government has agreed to permit an extension of credit to the Soviet Union for two important Siberian development projects and officials indicate the wraps may be taken off others in the coming months.

In addition, a high-level Soviet trade official arrived for talks in Tokyo this week, the first of his rank to do business with the Japanese since economic relations were partly frozen early this year.

In a typically Japanese manner, the slow policy change is not being acknowledged officially, just as the government never officially acknowledged that it had banned export-import credits after Soviet troops poured into Afghanistan. The change, however, has been reported in the Japanese press and confirmed by knowledgeable government officials.

Officials deny that the credit restrictions are going to be dismantled completely in the near future, but give several reasons why they are willing to embark on a gradual thaw.

The major one is a complaint by Japanese businessmen that they are losing important Soviet contracts to France and West Germany, countries which they say have not gone as far as Japan in the punitive freeze.

"No other country decided to suspend credits," said one official sympathetic to the businessmen's complaints. "Japan was the only one. As a result, our businessmen are severely handicapped and they have lost business."

He described as "not true" press reports that there will soon be a wholesale dismantling of the credit curbs. Only two have been ordered lifted so far. "But we cannot exclude the possibility that we may be inclined to lift the other suspension in time," he added. "Otherwise, Japanese trade [with the Soviets] would come to a halt."

The changing policy may bring the Japanese into a confrontation with the United States, which has softened its sanctions policy somewhat but which still wants to see the Soviet Union punished economically for sending troops into Afghanistan. It is understood that Japanese officials have mentioned five cases in which they would like to lift the ban on credits but have not specifically notified the Americans that they have actually lifted the ban in two cases.

Those two cases involved joint Japanese-Soviet projects in Siberia that are as important to Tokyo as they are to Moscow. One of them is a project to develop coking coal resources that needs an extra $40 million in credits. The Japanese, hoping to switch energy sources from oil to coal, are as eager sources from oil to coal, are as eager to get the Siberian coal as the Soviets are to develop it. The credits are to help the Soviets buy the coal-digging equipment from Japanese firms.

The other credits would help continue an 11-year-old Siberian lumber project, once discontinued by a Soviet initiative and now considered important to Japan. Business circles here are eager to get back on track so that Japan can begin buying Siberian timber by next January.

These were among several credits suspended without public announcement since early this year, after the United States exerted heavy pressure. The Japanese had gone along grudgingly, with officials arguing privately that economic sanctions would have little effect on Soviet policy.

During the past eight months, the United States agreed to exempt one project from the ban as requested by Japan -- a $350 million extension of credit for a Soviet purchase of steel pipe needed for a huge gas pipeline project.

During the eight-month period, Japan has also cut down its contacts with the Soviets, imposing a virtual freeze on visits here by high Soviet officials. The Japanese now point out that West European allies of the United States did not restrict their Soviet contacts comparably.

That embargo on high-level visits has now been partially broken by the arrival here this week of Soviet Deputy Foreign Trade Minister Vladimir Sushkov, the first sign that Japan is resuming the issuance of permits. Sushkov is scheduled to hold talks with Japanese trade companies on the development of oil resources off the island of Sakhalin. He is not scheduled to meet with government officials.

Some observers have suggested the trade thaw begun in recent days is a Japanese response to an unusual speech on Aug. 29 by Soviet President Leonid Brezhnev.

He said Moscow was ready to develop "significant and profitable" relations with Japan, but said those ties will depend on whether Japan manages to steer an "independent, realistic course" free of intervention from outside, meaning the United States.

Japanese officials, however, say the decision to lift the sanctions in two cases was made before Brezhnev's speech and was not a response to his statement.