Poland's Communist Party leader Stanislaw Kania and Premier Wojciech Jaruzelski will go to the Soviet Union in the "immediate future" for talks with President Leonid Brezhnev, the government announced today.

Their visit comes at a time of growing tension caused by an alarming deterioration of Poland's economy and especially by appalling food shortages that have led to street demonstrations and the threat of strikes.

The announcement coincided with a report by the Soviet news agency Tass that the Soviet Union would hold air, land and naval exercises along Poland's eastern frontier and in the Baltic Sea next month. The Soviet war games will be directed by Defense Minister Marshal Dimitri Ustinov, a fact interpreted by Western diplomatic observers as intensifying the Soviet warning to the Poles to put their house in order.

Kania and Jaruzelski will be the last Eastern European leaders to make the customary pilgrimage to Brezhnev's Black Sea vacation home.

The visit comes at a time when Poland appears to be facing a grave danger of social unrest because of increased public discontent over food shortages and the apparent inability of the independent trade union Solidarity to keep protests within orderly channels.

Solidarity yesterday appealed to the country to call off hunger marches and strikes protesting food shortages and asked Poles instead to work harder to help the country work its way out of what it called this "tragic situation."

When it made this appeal it appeared to be saying that food -- unlike the political reforms it has fought for and largely won over the past year -- cannot be obtained by grass-roots pressure.

The call for harder work instead of protests had a poignant irony. Seven months ago, the issue of free Saturdays was one of the main sources of union-government confrontations. The union eventually won this battle, with three out of four Saturdays each month designated free days by the government. Yet Solidarity now has urged union members to work an additional eight Saturdays this year to help the country's economy.

Today, the Communist Party newspaper Trybuna Ludu welcomed Solidarity's decision as a sign of "partial return to realistic thinking" containing a "considerable dose of realism" in the assessment of Poland's current criisis.

But the newspaper said that the union's communiques continue to display "unceasing suspiciousness" of government intentions and the threat of "violent reactions" on issues where the two sides do not agree. It especially denounced the threat of a nationwide printers' strike next week, asking how this could be reconciled with a willingness to help reduce tensions.

Solidarity's shift yesterday reflected growing anxiety about spontaneous and uncontrolled protests against food shortages during the past two weeks.

Solidarity has continued its confrontation with the authorities over other issues such as its access to the mass media. The union also said that it would resort to strikes to redress specific grievances.

The food shortages have made both life and production difficult, and spontaneous protests have increased the danger of confrontations and violent repression.

Solidarity's move added a new element to the test of wills between the union and communist authorities.

The party, following a congress that is seen as having conferred greater legitimacy on it, has become much more assertive in its dealings with Solidarity. The government is increasingly on the offensive, accusing the union of paralyzing the economy and seeking to undermine Poland's commitment to the Warsaw Pact.

Yesterday, the union apparently sought to rebut these charges and demonstrate that it is prepared to take a constructive approach to economic issues.

In doing so, Solidarity took risks, according to political observers. It is not clear how the call for greater effort will be received by its membership, and the government may see the shift as a sign of union weakness and increase its pressure instead of seeking a new compromise.

So far the government has failed to come up with promised innovations. There are no new economic reforms in sight nor are there any signs of a dramatic step that would jog the nation into new sacrifices to restart the economy.

There are lines for almost everything here and the shops offer little. This has produced an air of resignation in which the Poles do not want to think about tomorrow.

As the food crisis deepens, the underlying problems have become more difficult to solve and nobody seems able to offer a steadily more tired and nervous people a way out of the vicious circle in which declining exports and declining production are chasing each other on a downward spiral.