Most of the deaths were believed to be from overdoses of drugs the inmates stole from clinics they rampaged, according to the ministry, but the circumstances remain unclear.
The number of dead from riots in Italy's overcrowded prisons over measures imposed to contain the coronavirus rose to 12 on Tuesday, officials said.
Seven inmates died in the Modena prison on Sunday and Monday. On Tuesday, two others were found dead there as well as three imprisoned in Rieti, northeast of Rome.
The protests and riots began after authorities limited the inmates' contacts with family members in a bid to stop the spread of the coronavirus, which has hit Italy harder than anywhere else in Europe.
Italian prisons are chronically overcrowded, which could make inmates and staff more vulnerable to the contagion. They hold about 61,250 inmates, about 10,000 more than they were built to accommodate.
Inmates, many angered by restrictions on family visits, started going on the rampage on Sunday, setting fires, taking hostages, and escaping from one prison.
The ministry said in a statement that the most violent protests were "under control" by Tuesday, while occupations and demonstrations were still going on in 10 prisons.
All hostages, most of them guards and health workers, had been released by the inmates or freed by police.
Fifty inmates escaped from a prison in southern Foggia on Monday, and only 22 had been re-arrested by Tuesday morning, the justice ministry said.