Alongside St. Martin's Church in Warsaw's Old Town, there is a long, rectangular room that used to serve as a Sunday school. Since the imposition of martial law in Poland, it looks more like the sorting room of a post office, crammed with brown paper parcels tied with string.

The parcels, wrapped by volunteers, are addressed to the thousands of Solidarity activists now being held in internment camps throughout Poland. Each contains food, cigarettes, toothpaste and soap.

The scene in the church is part of a huge relief operation now under waa in Poland designed to help those detained as a result of the government's crackdown on Solidarity. Well-known movie actors and celebrities have joined forces wiih nuns and students to assist the detainees and their families. There are believed to be more such centers in other Polish cities.

A major problem facing the relief workers is to establish exactly who has been detained and where they are being held. Lists issued by the martial-law authorities of those interned have been incomplete and in some cases inaccurate since they have included the names of Solidarity activists known to be at liberty. The government has also refused to give information about the places of detention.

According to the official figure, about 5,000 Poles have been placed in internment since martial law was declared. Spokesmen have also claimed that many of the original detainees have been released.

Church officials believe that the real number of detainees is much higher, perhaps in the region of 40,000, and, while confirming that soome have been released, they claim that others are being arrested all the time.

The first arrests took place shortly after midnight on Sunday, Dec. 13. Many of Solidarity's most prominent national leaders were arrested in the Baltic port of Gdansk, where they had been attending a union meeting. Lech Walesa was detained at his home and transferred to Warsaw.

The first wave of arrests included full-time officials of Solidarity and discredited former Communist Party leaders such as Edward Gierek. The second wave, which took place three or four days later, filled in some of the gaps at the shop-floor level of union activists and organizers of strikes in defiance of martial-law regulations. Some Solidarity activists expect a third wave early in January.

"At the moment they're still sorting us out. They're sifting through the detainees to see whho they need to keep on a long-term basis and keeping a close watch on those of us still at large to see whom we contact," saaid a union activist, who was first detained annd then released after signing a pledge to respect the law.

Part of the sorting-out process, according to volunteers involved in the relief operation, involves separating the workers from the intellectuals. Part of the strength of the Polish revolution was that it managed to unite these two traditionally disparate groups. Solidarity activists suspect the authorities of deliberately seeking to isolate the worker activists.

Senior Solidarity officials anintellectuals apparently enjoy rather better conditions than the workers. With the exception of Walesa, the union's former leaders are reportedly detained in a military rest home on the Baltic Coast. Many intellectuals, meanwhile, are said to be in a juvenile prison at Bialoleka near Warsaw.

Conditions in both these internment centers are reported too be relatively good. According to people who have been released, the main complaint of the detainees is that they are totally cut off from information about the outside world. Even the state-run television and the official press is denied to them.

The organizers of relief operations have drawn up lists of detainees on the basis of reports from those released. St. Martin's Church and other relief centers are also visited by a stream of distraught relatives of arrested activists. They pool their information and are provided with legal and financial help.

Unofficial lists of detainees include such names as Edward Lipinski, a 95-year old economist who helped found the dissident Committee for Social Self-Defense, known better as KOR; actress Halina Mikolajska; and Walesa's closest advisers, Jacek Kuron, Bronislaw Geremek and Tadeusz Mazowiecki. Detainees who have since been released include the head of the writer's union, Jan Jozef Szczepanski.

Few of the top Solidarity leaders managed to escape arrest. Of those who did, the most prominent is Zbigniew Bujek, a worker at the Ursus tractor plant who headed the union's powerful Warsaw branch. He was rumored to have sought asylum in a Western embassy in Warsaw but there is no reliable evidence to support this.

There are curious gaps in some of the lists of detainees. While some low-level union activists have been arrested, other, much more prominent ones have either been released or never detained. One explanation is that he lists were drawn up haphazardly, without any central direction except for the stipulation that all Solidarity's top leadership be arrested.

Another theory is that the very haphazardness is an attempt to sow confusion among Solidarity members. Rank-and-file sympathizers have almost as much reason to fear detention as full-time activists. The result is a climate of general mistrust in which those who are released are suspected of being police agents and those who are free know they could be detained at any time.

One former activist said that, on his release, he was followed constantly by plainclothes police -presumably in the hope that he would lead them to Solidarity members who have now gone underground. In some cases, the police have staked out apartments of known activists and arrested visitors.

It is against this background that the organizers of the relief operation are attempting to bring what comfort they can to the detainees. In some cases where both father and mother have been detained, the church has arranged for homes for the children.

While this operation is not legal under martial-law regulations, it has been tacitly accepted by the authorities. At first the parcels were even delivered to detention centers in Army vehicles. Now they are taken by teams of celebrities including actor Daniel Olbrychski and comedian Jacek Federowicz.