Pilots can sleep while flying, but they need to be able to wake up quickly if something happens. They also need to be able to fly the plane manually if necessary.