The Sandinista government has eased unofficial travel restrictions on civilian opposition leaders during the past four days after the apparent harassment campaign drew criticism here and abroad.

Technical and legal problems over passports and visas disappeared Wednesday and Thursday for most of a group of about 25 business, political and union leaders who had been unable to leave the country for several weeks, opposition leaders said.

The group was composed almost entirely of leaders of organizations in the Democratic Coordinator, the principal opposition political alliance, which supports increased political pluralism and safeguards for the business community.

Application of the restrictions followed the elections here Nov. 4. Censorship also was tightened after the election and appears to remain at approximately the level that existed before the campaign began in July. The government also has spelled out a threat, formerly hinted at, to crack down on parties that did not participate in the election.

In a related development, some opposition leaders were considering moving to Costa Rica because of the difficulties of carrying out political activity in Nicaragua, according to opposition and diplomatic sources. La Prensa co-editor Pedro Joaquin Chamorro recently said in the United States that he was moving from Managua to San Jose, Costa Rica, for this reason, and other leaders were said to be planning to move there as well.

It was not clear if the easing of travel restrictions would affect their plans.

Following the Sandinista Front's election victory, the Nicaraguan government accused the Reagan administration of deliberately whipping up anti-Sandinista feeling. Administration sources leaked reports on the night of President Reagan's reelection Nov. 6 that the Soviet Union possibly was delivering MiG warplanes here. This would have raised the possibility that Washington would make good on previous veiled threats to use force against any high-performance combat aircraft supplied to Nicaragua.

Not only was press censorship tightened here. Taxi drivers and other residents even noted that police in Managua suddenly were more visible on the streets and handed out more traffic tickets.

"They pulled in the slack in the reins all around, and maybe a little more than the slack," a foreign political observer said.

The measures ended a three-month period during the election campaign when censorship was eased and some restrictions on political organization were lifted. The steps in November fueled critics' charges that Nicaragua was moving toward totalitarianism, and government sources expressed concern about the impact on international public opinion.

"The problem has been resolved at this time," Deputy Interior Minister Luis Carrion said in an interview Friday. The opposition newspaper La Prensa reported the same day that "travel restrictions have been lifted."

A visiting U.S. congressional delegation of the House Hispanic Caucus protested the travel restrictions and censorship in a meeting eight days ago with Junta Coordinator and President-elect Daniel Ortega. Ortega acknowledged that there had been some abuses because of excessive revolutionary zeal, but he did not mention specific cases, the congressmen said afterward.

Nicaraguan government officials publicly have denied that anybody was prevented from leaving the country. Ortega said after meeting the congressmen that some opposition leaders had had problems with their documents. Interior Ministry spokesman Lt. Miguel Necoechea said that some opposition figures had been victims of changes in visa regulations and that some were required to clear up tax matters before leaving the country.

Privately, however, government sources have acknowledged that the opposition was being pressured and said that it was due in part to irritation over the opposition leaders' frequent travels. Sandinista leaders reportedly were angered by civilian opposition leaders' contacts abroad with leaders of the exiled, armed opposition -- particularly at a time when U.S. hostility to Nicaragua appeared to be rising.

The impression that there had been a deliberate campaign to harass the opposition was reinforced when so many different visa and passport difficulties were resolved in two days last week.

"Apparently there was an order to give visas to everybody," Myriam Arguello, a senior official of the opposition Conservative Party of Nicaragua, said. She said that she received her passport and visa Thursday after waiting since Nov. 6 for it to be returned after a visa was requested. Interior Ministry migration authorities told her that the passport had been "lost in a war-torn region," she said.

Dr. Luis Rivas Leiva, the former president of the Coordinator, left the country Friday after receiving his visa Thursday, a family member said. He had been waiting for several weeks.

Leadership of the opposition was up in the air following the Coordinator's decision against participating in the elections, opposition and diplomatic sources said. The influence of the alliance's proposed presidential candidate, former junta member Arturo Cruz, diminished with the end of the campaign and with his decision to remain abroad, according to the sources. Cruz lives in a suburb of Washington, where he recently left a job with the Inter-American Development Bank.

Rivas Leiva, president of the opposition Social Democratic Party, stepped down from the additional office of president of the coordinator with the election Thursday of Eduardo Rivas Gasteazoro. The latter, who has drawn little publicity in the past year, previously was an interim president of the Coordinator.

The government is considering curbing the Coordinator's political organizing rights following Ortega's inauguration on Jan. 10, according to Deputy Interior Minister Carrion. He also is one of the nine "commanders of the revolution" in the Sandinista Front's National Directorate, or executive committee.

Carrion confirmed that the government was considering barring the Coordinator's member organizations from working publicly as political groups. "This is a political decision" that probably will be taken "after the government takes office," Carrion said.