Aviation regulations state that two pilots are required onboard a commercial aircraft, but they don't typically state that two pilots must remain in the cockpit at all times. However, airlines are free to implement their procedures, above and beyond what the regulator requires.