In 1530 the combined troops of Charles V and Medici Pope Clement VII lay siege to Florence. The bell tower of San Miniato al Monte was part of the defences. Michelangelo Buonarroti, as he was good at most things, was put in charge of defending the city. He used the ploy of hanging mattresses on the outside of the tower to minimize damage from cannon fire.
In times of war or siege, Italian families would vacate their homes and rent apartments in safer areas. In order to protect themselves they would hire soldiers to sleep on the floor in shifts.
Ordinarily we would want to verify such stories before publishing them here as part of a phrase derivation. In this case though it isn't really important. The meaning of the phrase turns on the association in Italian folk-memory of mattresses with safety in wartime. The phrase wasn't well known outside of the USA and Italy prior to the Godfather movies. It was used there, and later in The Sopranos television series, to mean 'preparing for battle'. Whether or not the stories that originated it are true doesn't alter the fact that the screenwriters of those films used them in that context.
Here's the dialogue from Godfather:
That Sonny's runnin' wild. He's thinking of going to the mattresses already.
No, no, no! No more! Not this time, consiglieri. No more meetings, no more discussions, no more Sollozzo tricks. You give 'em one message: I want Sollozzo. If not, it's all-out war: we go to the mattresses.