bunk bed
n.
A type of multiple bed in which one bed is stacked on top of another. It is used to save space in crowded quarters, typically as furnishings in children's rooms, ships, trains, garrisons or university residence hall bedrooms allowing two people to sleep in the same room while maximizing available floor space.
The top bed normally is surrounded by a railing to prevent the sleeper from falling out.