How do you sleep in Minecraft without a bed?

How do you sleep in Minecraft without a bed?

See also  What was Minecraft 1.0 called?