Do pilots sleep in the cockpit?
Approximately 56% of pilots have accidentally fallen asleep during a flight (or perhaps taken naps). Fortunately, modern planes work in an automatic mode for almost the entire flight, and traffic controllers require the pilots to be in contact all the time.
On longer flights, there can be 2 crews or 3 pilots that substitute each other so that everyone can have some rest. Pilots sleep and rest in a special room. It’s important that the crew is in touch with traffic controllers all the time and that at least one pilot controls the flight.