How do you sleep in Minecraft without a bed?

How do you sleep in Minecraft without a bed?

See also  What can you do with a Nintendo Switch without games?