The stocky teen-ager crouched on a pile of rubble that before the 1979 revolution had been part of the east wall of the central market of Masaya, a bustling town about 15 miles southeast of Managua.

But the boy, who said his name was Julio, had no bravado in his voice, only bitterness, when he described the Sandinista victory against former dictator Anastasio Somoza.

"At least when Somoza was here you could buy a little sugar," he complained. "And there was no one trying to force you to go out and cut cotton for nothing. And the sorghum wasn't rotting in the warehouses."

Figures such as Nicaragua's projected $300 million balance of payments deficit mean little to the former Sandinista street fighter. He knows what he sees, and that corresponds to what government economists readily concede: Nicaragua's economy is in serious trouble.

Julio says he does not understand the balance of payments problem, yet it is the reason he could not find sugar recently. Nicaragua, which exports sugar, had a temporary shortage because the Sandinista government tightened local supplies in order to increase exports as world prices rose.

The balance of payments problem and the rising disenchantment with the Sandinistas' inability to make good on promise of abundance, are a major reason for the Sandinistas' desire to maintain good relations with the United States, this country's most important source of foreign aid.

Relations between the United States and Nicaragua have been strained recently by U.S. charges that the Sandinista government funneled arms to leftists guerrillas in El Salvador. Although Nicaraguan officials have denied the charges, the Reagan administration has temporarily suspended aid here. But some U.S. officials argue that aid should be resumed so that the growing dissatisfaction with the Sandinistas is not transferred to the United States, especially when further shortages are expected in the near future.

"The real crunch is going to come in the spring," one economist predicted. "That's when we have to import seed and fertilizer and pesticides and other agricultural equipment. If we don't have the money to do that, we're finished."

Nicaragua spent about $750 million for imports last year. With inflation, Nicaragua would have to spend at least $860 million this year, according to one set of estimates, just to keep pace. Some economists believe that this year Nicaragua may not have more than $600 million available for imports because of poor coffee and cotton harvests.

The coffee crop was partially damaged by disease, and prices were not good, one economist said.Although cotton production and prices were good, a critical shortage of manpower during the harvest is costing millions of dollars in losses.

The cotton situation demonstrates some of the complex problems facing the Sandinistas in their efforts to boost production. One reason for the shortage of pickers is the loss of migrant workers from El Salvador and Honduras. They used to pick more than 15 percent of the crop, but as the value of Nicaraguan money plummeted after the revolution, they began refusing to come.

The government's policies hurt, also. Government economists estimated that they achieved a fivefold increase in the amount of credits available to small and mid-sized farms to help improve production. The only problem was that many of the farmers, who once formed part of the migrant labor pool picking cotton on the plantations, decided they had enough money and did not pick cotton this year.

The government has been exhorting, some say coercing, students, teachers, and government workers to volunteer in the fields, apparently with mixed success.

Party leaders admit they are worried about the continued economic crisis and what they recognize is growing dissatisfaction among the people. But the Sandinistas continue to blame much of the present crisis on Somoza's economic policies and the chaotic conditions during the intense months of fighting before he was overthrown.

U.S. officials and private economists agree that the economy was in a shambles when the Sandinistas took control. They also agree that the effect of mismanagement and war will be felt for a long time.

But several economists and State Department officials blame the Sandinistas for making things worse. They point out, for example, that the business sector, rather than investing, is pulling money out of the economy because businessmen have been intimidated and frightened by constant Sandinista-sponsored propaganda calling the middle class traitors and imperialist agents.

The Sandinistas also have sought to blame some of their troubles on internal "counterrevolutionaries" and "imperialism."

But casual conversations with dozens of workers here indicate that the Sandinistas' excuses are wearing thin.

"The people aren't stupid," said a waiter in Managua. "They know what's going on."

Yet nearly everyone here seems to believe the current shortage in bread is the result of a U.S. embargo on wheat sales.

The Reagan administration blocked a proposed loan of $9.6 million that was to have been used to purchase wheat. But at a recent press conference, a Sandinista government official, while denouncing the aid suspension, said that Sandinistas may have used the money for other imports and await a Canadian shipment in early July.

Those comments never made it into the Sandinista-dominated media, which for days condemned the United States for "taking bread out of the mouths of Nicaraguan children."