On a flight from Singapore to New York, the crew working your cabin will have been on duty far longer than you've been awake in your seat. So where do they sleep? The answer is a hidden compartment most passengers never notice: a locked staircase in the galley leading up into the crown of the aircraft, lined with stacked bunks.

On flights exceeding roughly 13-14 hours, regulators require airlines to provide dedicated rest areas for pilots and cabin crew. These aren't spacious cabins - think low ceilings, six to ten bunks for flight attendants and two or three for pilots, blackout curtains and temperature-controlled ventilation. On the Boeing 787 they sit above the forward cabin, often described as snug, coffin-like berths; the Airbus A350 compartments used on the world's longest routes are slightly roomier. Crew swap uniforms for loungewear, and a senior attendant will hang a tie on the bunk curtain so colleagues know who's resting - useful in an emergency.

The rotation schedule is carefully engineered. On Air New Zealand's 17.5-hour New York-Auckland service, rest begins a few hours after departure, with flight attendants rotating through the bunks every two to three hours so the cabin is never under-covered. A typical long-haul rhythm runs meal service, rest for half the crew, a light service stretch, then rest for the other half, before breakfast and arrival prep. Regulators aim for at least one full sleep cycle - around 90 minutes - per break, with longer, more structured rest built into flights approaching 18 or 19 hours.

Rest planning starts well before boarding. Airlines must schedule crews to arrive fully rested, and weather complicates everything: winds on the Auckland route can shift flight time by up to three hours, and payload limits can force fewer passengers to make room for fuel. That variability means rest periods have to flex too. Crews lean on fatigue risk management training, caffeine timing, hydration and controlled light exposure to stay sharp, and quiet rest still counts when sleep won't come - not every crew member finds the bunks easy to sleep in.

The logistics matter more than ever as airlines chase longer nonstops. Qantas' Project Sunrise is studying the effects on both passengers and crew of 19-20-hour Sydney-London and Sydney-New York flights, while Turkish Airlines plans an Istanbul-Sydney route of about 17 hours. Expect bigger bunk areas, more rest cycles and possibly onboard spaces for stretching as aircraft range outruns human endurance.

For travellers, this is quietly reassuring: the crew serving your third meal on hour 15 has been through a planned rest cycle, not just pushed through on adrenaline. Those mysterious locked doors near the galley aren't storage - they're a key part of what makes ultra-long-haul flying safe. So if you're eyeing one of these marathon routes, know that the calm cabin is no accident; there's a whole hidden operation above your head making sure of it.