The strange reasons medieval people slept in cupboards
The strange reasons medieval people slept in cupboards

www.bbc.com
The strange reasons medieval people slept in cupboards

Short answer: it helped keep you warm.
-- but it is an interesting piece of cultural history and the article has nice images of such beds.