The British government, searching for a way to rid itself of the last 590 Argentine prisoners seized on the Falkland Islands, is seriously considering a unilateral declaration that hostilities in the South Atlantic are at an end, official sources said today.

Argentina's release today of its only British prisoner, a Harrier pilot who was being sent to Uruguay, and recent ambiguous but basically peaceable statements by Argentine leaders may provide Britain with enough leeway to clear up the prisoner problem. "You can be sure we don't want a bunch of Argentine POWs indefinitely in a British concentration camp somewhere," one source declared.

Officials said the British still hope to pressure the Argentines into a formal statement that the fighting is ended. That would enable the Thatcher government to return the prisoners, lift shipping restrictions and end economic sanctions against Argentina. In the absence of such a statement, the British have insisted that they would hold the prisoners, including the former commander of the Falklands garrison and other senior officers, as "hostages."

But the prospect of shipping the prisoners 8,000 miles to Britain is an onerous one, officials said, so the government is preparing a declaration that the fighting is over. They said the plan is to assume the declaration to be accepted by Argentina if it is not contradicted in a matter of days. The prisoners would then be shipped to Argentina.

The other measures--sanctions and the exclusion zone--would not be affected. These would constitute Britain's remaining leverage on Argentina to indicate that it would not again attempt to invade the islands. Britain could then withdraw the bulk of its forces from the region, a move sought here on grounds of cost as well as other defense commitments.

The most recent reports from Argentina quote officials there as saying there can be no formal cessation of hostilities until Britain agrees to open negotiations on the future sovereignty of the islands. This, Prime Minister Margaret Thatcher has said repeatedly, she would not do.

To ease the deadlock, Britain two weeks ago dropped its demand for an explicit pledge by Argentina that hostilities were over and said "positive indications" would be sufficient. Since then, Argentina's new president, Reynaldo Bignone, and other senior officials have maintained that Argentina's claim to the Falklands remained in force. But they have made no suggestion that further belligerency was in prospect.

The continued quiet in the region, reinforced today by the release of the British pilot, is probably enough, officials say, for a British unilateral declaration to be issued. The final decision has yet to be taken, however.

"There are indications that Argentina will not take new military action," Cransley Onslow, a Foreign Office official, told Parliament today, "but it is very difficult to decide what they all mean."

The prisoners apparently are becoming more trouble than they are worth to the British. Last weekend they were put aboard the merchant ship St. Edmund in Port Stanley and it was said they would leave shortly for an undisclosed location. Sources said the ship would head slowly for Ascension Island, halfway between Britain and the Falklands, in hopes that the ship could be turned around early and go to Argentina instead.

As of today, the ship remained off the Falklands while the government decided what to do about it. By keeping the prisoners on a ship, Britain is in technical violation of the Geneva Convention on treatment of prisoners, officials conceded. But they said their forces are in close touch with representatives of the International Committee of the Red Cross on the islands to assure the best possible treatment for the prisoners.

Among the POWs is Gen. Mario Menendez, who commanded Argentine forces in the Falklands. More than 10,000 conscripts and some officers have already been returned to Argentina.

Thatcher announced yesterday the terms for an extensive government investigation of why Britain was unable to forestall the Argentine invasion April 2, and separate probes are under way into how Britain's equipment performed and how the media functioned during the conflict.

A lesser controversy remains to be resolved over the details of a religious service of thanksgiving scheduled for St. Paul's Cathedral on July 26. One proposal calls for reading the Lord's Prayer in Spanish as well as English, out of respect for the Argentine dead. But objections have been raised to that plan on the grounds that it would diminish the gesture to the British casualties. Thatcher has said she is still studying the matter.