The macabre discovery was made after Swedish ship Poseidon was sent to the aid of the stricken vessel by the Italian coastguard, which said it was simultaneously coordinating rescue operations for multiple boats carrying at least 2,000 people.
Swedish coastguard spokesman Mattias Lindholm told AFP the Poseidon had been able to save 439 people on the wooden boat.
“Unfortunately there were around 40 people dead in the hold,” he said. “The bodies are currently being transferred to the Poseidon.”
The Swedish ship was in the area as part of the EU border agency Frontex's search and rescue mission known as Triton.
Just before the discovery of the bodies, the Poseidon had picked up 130 migrants from a rubber dinghy, Lindholm said.
Italian media reported that another boat with some 700 people aboard was in trouble in the same area.
MOAS, a Malta-based private organisation, said in a tweet that its boat the Phoenix was taking part in a complex rescue operation.
“Phoenix are working with Italian and Swedish vessels to assist thousands,” it said.
Italy's coastguard said at least 10 vessels had issued distress calls and at least 2,000 migrants, “probably more” were in danger.
On August 15th, the Italian navy discovered the bodies of 49 migrants asphyxiated in the hold of a people smuggler's boat. Survivors later testified that the victims had been locked below deck and constrained to stay there by force.
More than 2,300 migrants have died at sea this year during attempts to reach Europe, almost invariably on overcrowded boats chartered by people smugglers.