THE RELEASE of Lech Walesa came so close to the death of Leonid Brezhnev that it was probably not a direct result of it. More likely, this development resulted from the evolution of a Polish strategy already well in train. Nonetheless, it happened on Yuri Andropov's watch, and so did Ronald Reagan's indirect reaction to it yesterday -- his announcement that the pipeline sanctions are to be lifted in favor of a broad new allied approach to East-West trade. So with no one having apparently planned it that way, things are a little different already.

It is a joy to have the valiant Mr. Walesa rejoin his family after 11 months as a political prisoner. He does seem, however, to be going home on the regime's terms, not his own. He had wanted to be released to speak for Solidarity in a "dialogue" with the government and the Church. The government refuses dialogue. Last month, it banned Solidarity, having only suspended it earlier. It has arranged a separate peace of sorts with the Church, agreeing to clean up its act enough to allow Pope John Paul II to visit next spring and obtaining the Church's favor for "social peace" -- an easing of anti-regime worker demonstrations and anti-worker regime repressions. The government waited to release Mr. Walesa until it had successfully intimidated workers into ignoring an underground Solidarity strike call. It made clear it was sending him home not as anybody's representative but as a private man.

"Free Lech Walesa" was a commonly heard Polish slogan, faithfully echoed in the West. He is going home, but he is not free in that intended sense. A further release of prisoners is expected, and martial law may be formally ended soon -- all of this done not by negotiation and reconciliation but by government manipulation and decree. This raises a real question for the Polish workers' movement. It will also test the outlawed Solidarity's foreign friends.

Plainly, the regime hopes to argue that it is solving the Polish crisis and, therefore, there is no further reason for the West to deny economic cooperation on political grounds. The seductive argument will be heard that the best way for the West to help the unfortunate Polish people is to restore its pre-crisis involvement in the Polish economy. One can expect the allies soon to be urging Washington to accept this "realistic" point of view.

The Reagan administration's first reaction to the Walesa release, on Friday, was to worry that it was being trapped by the Poles. Its second reaction, yesterday, was the Reagan announcement terminating the sanctions on helping build the Siberia-to-Europe natural gas pipeline. The president had imposed these sanctions on American firms last December, and he had extended them to American foreign subsidiaries and licensees last June. The first cut was painful in certain American locales, and the second produced a boiling Atlantic crisis.

The Reagan decision yesterday was the right one. The United States was on the way anyway to lifting the pipeline sanctions: this was the whole point of the talks the State Department had been conducting with the allies on a new common approach to East-West trade. The release of Mr. Walesa appears merely to have advanced the date on which success in achieving a new approach would be announced. Mr. Reagan was wise to define the new accord as one of "principles": to restrict trade that contributes to a Soviet "military or strategic advantage" or that constitutes "preferential aid." The unavoidably contentious work of determining how these principles will be applied remains to be done.

But this is not an argument against the Reagan decision. In the evolving Polish circumstances, it was bound to be increasingly difficult, and increasingly less worth the escalating effort it would surely take, to try to maintain a united Atlantic front on anti-Polish and anti-Soviet sanctions. It was past time to deflate the Polish issue as a source of tension in the alliance, which has other, more important tasks before it in the military as well as the economic realm. That this sequence was not designed in the first instance as a gambit for the Soviet transition, moreover, does not mean nothing good can come out of it in that context.