When flying double-digit hour flights, such as 13 hours from Chicago to South Korea or 18 hours from Singapore to Newark, New Jersey, everyone on the plane, including the pilots, will most likely experience jet lag, as the passengers will experience "nighttime" at some point and become sleepy. Since there are two pilots, the pilot and the copilot, how do they manage their time? Does the copilot start flying the plane when the pilot rests, or vice versa? Or do both stay awake for a grueling 18 hours? Or do they rely on autopilot?
Airlines are required to have extra pilots on long flights so that pilots can take rest breaks.
A typical 18 hour flight from New York to Singapore will have four pilots. The pilots will divide the rest breaks so that there is always two pilots in the flight deck at the controls, and two pilots in a crew rest facility. Most crew rest areas will have beds or bunks to sleep in.
Typically all four pilots are in the flight deck from takeoff to about 10,000' and then again from 10,000' to landing. The cruise portion of the flight be divided so that each pilot gets an equal amount of rest. Various airlines will differ on how this is done.
Usually two pilots will be paired to take the same rest breaks so that they don't disturb anyone when they enter or leave the crew rest area. For example many airlines will divide a 16 hour cruise portion of the flight so that the paired pilots each get two 4 hour breaks. Some airlines will divide the time so that there is one 8 hour rest period instead of two 4 hours rest periods.