My background is in physics, so I was the mission specialist, who is sort of like the flight engineer on an airplane.
So most astronauts are astronauts for a couple of years before they are assigned to a flight.
I slept just floating in the middle of the flight deck, the upper deck of the space shuttle.
On both of my flights, everything went very well.
Once you are assigned to a flight, the whole crew is assigned at the same time, and then that crew trains together for a whole year to prepare for that flight.