It’s just a matter of lying down, standing up or floating into this narrow space.
Then you are strapped into a sleeping bag to stop you floating around.
You might think it would be difficult to sleep in space, especially as they are orbiting the earth every 90 minutes andso night and day don’t make any sense any more, but astronauts are so well conditioned by their training that they can sleep anywhere.