A sonic boom shook ceilings in Managua and the port of Corinto today for the second morning in a row, and the government said that the cause again was an overflight by a U.S. spy plane.

A military convoy left Corinto last night carrying four or five large, metal-colored containers that had been unloaded from a Soviet ship, port employes said. But a knowledgeable source here said that the crates were not of the size or type used to ship warplanes.

The crates were taken to Sandino Airport here in Managua and probably contain military helicopters, according to the source, who briefed U.S. reporters on the condition that he remain anonymous.

The United States has suggested that it would bomb any high-performance warplanes delivered here, and suggestions in Washington this week that warplanes might be arriving have triggered a fresh round of Nicaraguan warnings that a U.S. attack could be imminent.

The sonic boom was heard here at 8:25 a.m. and at Corinto at about the same time. A second boom was heard in Corinto at about 1 p.m., residents reported, but the Foreign Ministry said it had no reports of a second spy flight.

Despite the sonic booms and the alarmist statements by Nicaraguan leaders, citizens interviewed in brief, informal conversations today did not seem more concerned than usual about the possibility of war with the United States. Nicaragua's leaders have predicted a U.S. attack so many times in the past that the latest warnings appeared to have had little effect.

"We're accustomed to it by now. We've been expecting earthquakes every day," said an Army second lieutenant, who gave her name only as Socorro. A bit less sanguine was Felipe Barrios, who was hauling a wooden cart with vegetables down a Managua street: "Maybe we'll have to go up in the hills to fight again. We'll have to see what Reagan decides."

It was uncertain whether the U.S. spy planes were causing the sonic booms deliberately to intimidate Nicaragua's left-wing government, or whether the booms were audible because the planes had to fly lower than usual to get better pictures of the Soviet ship at Corinto. The SR71 reconnaissance aircraft causing the booms usually fly so high that they cannot be heard from the ground.

Nicaraguan government officials expressed concern over reports from the United States yesterday confirming that spy flights were being carried out.

"It's not new that there are flights, but now they're admitting it," one official said. "We wonder what that means."

In Corinto, port employes said that the Soviet ship Bakuriani apparently had finished unloading its military cargo and was expected to leave tonight or tomorrow. U.S. officials had expressed particular interest in the Bakuriani because satellite photographs had suggested that Soviet-made MiG21 warplanes might have been loaded on it several weeks ago before it left a Black Sea port to come here.

Since it docked Wednesday, however, no crates have been unloaded of the type that would contain MiGs. Most of the cargo has been small boxes apparently containing ammunition and small arms.

At a meeting of the U.N. Security Council Friday night Nicaraguan Ambassador Javier Chamorro Moro denounced reports of the possible MiG21 shipments, calling them an excuse "for direct military attack on our country," special correspondent Michael Berlin reported.

A man who works for a shipping agency at Corinto told special correspondent John Lantigua today that he saw four large, metal- colored containers on the dock yesterday. He said that four flatbed trucks carried them away between 9 p.m. and midnight yesterday.

According to the man's description, the containers were between 30 and 35 feet long, about 6 or 7 feet wide, and about 8 or 9 feet high. A stevedore who helped to unload the Bakuriani said he saw five such containers, and there were reports that several motorboats also were unloaded.

The knowledgeable source who said that the containers were for helicopters said that they appeared to hold "one or two" Soviet-made MI8 helicopters and "maybe" one or two MI24s as well. Diplomatic sources say Nicaragua already has about 10 MI8s, which are for ferrying troops or cargo, but had not received any of the more powerful MI24 assault helicopter gunships until a Bulgarian ship arrived with them about two weeks ago.

Two U.S. Embassy officials -- the political-military officer and the economic attache -- were in Corinto this afternoon questioning port employes about what had arrived. They said that they had come to find out what was happening.

A Defense Ministry spokesman denied reports that the Soviet freighter unloading at Corinto had delivered helicopters "of any type." He declined to describe the ship's cargo any further, except to reaffirm that it did not include warplanes.