Astronauts sleep in special sleeping bags that are attached to the walls or ceiling of their spacecraft. This is because there’s no gravity in space, so they would just float around if they didn’t!
Astronauts sleep for about eight hours a night, just like we do on Earth. They’re also provided with special eye masks and earplugs to help them sleep better in the noisy environment of a spacecraft.