This is a great way to use cheap materials for high impact. Construction Tips from Improvised Life website.
“Use only enough blocks to place them exactly the footprint of the mattress (even if it meant spacing the blocks a bit, or using a different size). To reduce their massive weight, arrange the blocks in a rectangle with a hidden piece of plywood resting on them to support the mattress. Also place furniture sliders on the bottom of each block to keep them from damaging the floor and making it easier to move the bed.”