Legally or by underground railroad, increasing numbers of Nicaraguans are leaving the country, often to escape military service in the guerrilla war here or because of economic hardships and uncertainties.

The growing flight primarily reflects unwillingness to join the Popular Sandinista Army in its struggle against U.S.-backed anti-Sandinista rebel forces, according to interviews with youths who have fled to neighboring Honduras or Costa Rica. Service became obligatory in October 1983 and the first inductions came last year.

But older Nicaraguans, particularly educated professionals, say their departures demonstrate a spreading assessment that private-sector economic opportunities are becoming limited. One businessman who resisted leaving mostly out of patriotism says now he has decided to emigrate because "we have reached the point of no return" in the five-year-old Sandinista revolution.

Many businessmen and professionals, particularly those from wealthy families associated with former dictator Anastasio Somoza, left soon after the Sandinista takeover in July 1979. But those leaving now appear to include younger professionals who previously embraced the ideals of the revolution but now have begun to despair of obtaining professional fulfillment or providing well for their families.

"You feel you have an obligation to those who brought you up and provided an education, to your family and your country, to those whose taxes made it all possible," said a young businessman. "But there comes a time when you have to think about yourself and what you can do here."

A party was held last week, he said, to bid farewell to two of his friends, both physicians, who have decided to emigrate to the United States mostly out of professional frustration. Another young professional said two of his friends, both engineers, have made plans to leave for the same reason.

Although draft-age men face restrictions that force many to leave illegally, the Sandinista government has imposed no formal controls on emigration by those who otherwise qualify to travel abroad.

There are no known reliable estimates on the number of Nicaraguans who have fled since the Sandinistas took power. But several barometers indicate the rate of departures has risen sharply since Sandinista authorities began pursuing draft evaders last summer and since the Sandinista victory in last November's elections removed what some professionals had held out as a possibility of change or moderation in the revolution.

Officials in Costa Rica and Honduras report the number of Nicaraguans entering those countries as refugees has grown markedly in recent months. In Honduras, the rate of Nicaraguans registering with the U.N. High Commissioner for Refugees in two camps near the border nearly doubled the previous pace, rising to 3,755 in the six months ending in February.

Relief workers estimate that many more Nicaraguans also have entered Honduras recently without registering with the government or international relief agencies.

Public Security Minister Benjamin Pisa of Costa Rica said 20,000 Nicaraguans have come to his country as refugees since 1979, with the rate increasing in the last year. He added that about 20 youths arrive monthly seeking asylum from the draft. The National Refugee Commission said more than 600 Nicaraguans entered Costa Rica in March alone in search of refuge.

The other main flows of refugees in Central America registered by the U.N. agency include 46,000 Guatemalans living in Mexico and 28,000 Salvadorans in Honduras or Costa Rica, while the largest recent exodus was of Nicaraguans prior to the overthrow of Anastasio Somoza.

In what appeared to underline official Nicaraguan concern over the recent exits, the Interior Ministry here announced two weeks ago the capture of several Nicaraguans who ministry officials said were running a clandestine escape network through which draft evaders could pay for help sneaking across the border into Honduras. Previously, Sandinista authorities arrested a Costa Rican Embassy employe who they said was selling false visas for entry into Costa Rica.

Youths who have fled to Honduras have said they paid from 6,000 to 80,000 cordobas, or from $120 to $1,600, for help from underground border passers called coyotes.

Officials of the main anti-Sandinista rebel group, the Nicaraguan Democratic Force based in Honduras, and of Eden Pastora's smaller guerrilla organization, based in Costa Rica, have explained that their men also organize flight out of Nicaragua for disgruntled youths encountered by rebel units inside the country. The military draft, they say, has become a recruiting boom for rebel ranks.

Youths interviewed at Pastora's headquarters camp on the banks of the San Juan River and at the main Democratic Force camp on the Honduran-Nicaraguan border repeatedly said the draft precipitated their decision to flee the country and join rebel forces.

Interior Minister Tomas Borge, a leading Sandinista theoretician and one of the country's most powerful figures, dismissed the importance of the draft evasion and other flight, saying it is a normal part of any revolution.

In addition, he said in an interview, Sandinista authorities have committed "odious" errors in enforcing draft laws too roughly in some cases, provoking opposition among youths and their families.

"It is a natural problem within Nicaragua's revolutionary process," he said. "It is like an earthquake . . . it gives rise to internal contradictions, so that part of the society does not accept the revolution. Emigration is a normal and natural problem in revolution."