Fasting on shift work
Standard fasting advice assumes you sleep at night. If you work nights or rotate, the fix is to anchor your eating window to your sleep, not to the clock. Tell us when you sleep and we will build a window that survives your shift, plus a caffeine cut-off so the coffee does not wreck your rest.
Your pattern
Your eating window
Last coffee by
Main meal
Sleep comes first, fasting second. If a fast is costing you sleep on a hard rota, shorten it. Related: the fasting calculator and troubleshooter.
How to use the shift-work planner
Choose your pattern: permanent nights, early or day shifts, or rotating. Enter when your main sleep starts and when you wake, then pick an eating window of 8, 10 or 12 hours. The planner shows your eating window, a time for your last coffee, a note on your main meal and a tip for your pattern.
The planner uses both times. Your window always sits inside your waking hours and ends at least 3 hours before your main sleep.
How the planner works out your window
Intermittent fasting on a night shift needs a different reference point. A day worker might eat from noon to 8 pm, but that window could fall in the middle of a night worker’s sleep. So the planner works from your own sleep, with two rules of our own. On permanent nights, the window starts 30 minutes after you wake and runs for the length you chose. On day, early and rotating shifts, it ends 3 hours before your main sleep and counts back. Either way, it never ends later than 3 hours before you sleep. If your waking hours are too short for the length you chose, the planner shortens the window and says so.
Our 3-hour gap sits at the top end of shift-work guidance for nurses from NIOSH, the US workplace health agency. That guidance suggests avoiding large meals 1 to 2 hours before your main sleep and heavy or spicy meals 2 to 3 hours before. It also suggests avoiding or cutting down food between midnight and 6 am. Where you can, it says to keep the normal day-and-night timing of meals.
| Pattern | Sleep starts | Window chosen | Eating window | Last coffee |
|---|---|---|---|---|
| Permanent nights (the planner’s starting values) | 8:30 AM, waking 3:30 PM | 8 hours (16:8) | 4:00 PM to 12:00 AM | 11:30 PM |
| 12-hour night shift, 7 pm to 7 am | 9:00 AM, waking 4:00 PM | 12 hours (12:12) | 4:30 PM to 4:30 AM | 12:00 AM |
| Permanent nights | 9:00 AM, waking 4:00 PM | 10 hours (14:10) | 4:30 PM to 2:30 AM | 12:00 AM |
| Early or day shifts | 10:00 PM, waking 6:00 AM | 10 hours (14:10) | 9:00 AM to 7:00 PM | 1:00 PM |
Intermittent fasting on a 12-hour night shift
Take a 7 pm to 7 am shift with sleep from 9 am to 4 pm. On a 12:12 window, the planner gives 4:30 pm to 4:30 am. Your main meal comes at about 4:30 pm, before the shift. After midnight, a light snack is enough. Your 12-hour fast then runs from 4:30 am to 4:30 pm and covers your whole sleep.
On 16:8 with the same sleep, the window becomes 4:30 pm to 12:30 am, so almost all of it comes before midnight. It ends eight and a half hours before you go to bed.
The caffeine cut-off
The planner puts your last coffee 9 hours before you sleep. A 2023 meta-analysis of caffeine and sleep set a minimum gap of 8.8 hours between a cup of coffee and bedtime. Its cup was 250 ml with about 107 mg of caffeine. For a pre-workout drink, the figure was 13 hours. On nights, a 9 am sleep therefore means your last coffee by midnight, even though the shift runs until 7 am.
Rotating shifts and day shifts
For day and early shifts, the planner’s window looks like an ordinary daytime one. Rotating shifts are harder, because your sleep keeps moving. Re-enter your new sleep time each time the rota changes. Our suggestion is to move your eating window an hour or two a day towards the new pattern. During the changeover, drop to a shorter window.
Why sleep comes before the fast
About one in six US workers (16%) usually works evenings, nights or other hours outside the day, and the planner is built around their sleep. When young men in a small trial slept less, their leptin, a hormone linked to fullness, fell by 18%. Ghrelin, a hormone that drives hunger, rose by 28%. That evidence is early, from one small, short study. Still, a fast that costs you sleep may leave you hungrier. If your rota is hard this week, shorten the fast and protect your sleep.
Who should be careful
Diabetes treated with insulin or a sulfonylurea needs a doctor’s input before you fast around shifts. Pregnancy and being under 18 are also reasons to get advice first. With a history of an eating disorder, we advise against fasting around shifts. If you are thinking of a fast longer than 24 hours between rotas, talk to a doctor before you try it.
Related tools and guides
If your last meal was at the end of a shift, the fasting timer can start your fast from that earlier time. Black coffee is fine during the fast, and the coffee guide covers milk, sugar and creamers. When a shift leaves you with a headache or low energy, try the fasting troubleshooter. The 16:8 schedule page has more on daily 8-hour windows.
Frequently asked
Can you do intermittent fasting on night shifts?
Yes, if you set the eating window by when you wake and sleep instead of by the clock. On permanent nights, the shift-work planner starts your window 30 minutes after you wake. The window never ends later than 3 hours before your main sleep. Put your main meal at the start of the window and keep food light between midnight and 6 am.
When should I eat on a 12-hour night shift?
Take a 7 pm to 7 am shift with sleep from 9 am to 4 pm. The planner's 12:12 window runs from 4:30 pm to 4:30 am. Eat your main meal at about 4:30 pm, before the shift starts. If you get hungry after midnight, keep it to a small snack.
Does 16:8 work on night shifts?
It can. With sleep from 8:30 am to 3:30 pm, the planner's 8-hour window runs from 4 pm to midnight. That keeps food out of the midnight to 6 am stretch, when shift-work guidance suggests avoiding or cutting down food.
When should I stop drinking coffee on a night shift?
The planner sets your last coffee 9 hours before you go to sleep. A 2023 meta-analysis put the minimum gap at 8.8 hours for a cup of coffee and 13 hours for a pre-workout drink. For a 9 am sleep, that means no coffee after midnight.
How do I fast when my shifts rotate?
Keep the window anchored to your main sleep, and change your sleep time in the planner when the rota changes. Our suggestion is to move the window an hour or two a day towards the new pattern instead of all at once. During a changeover week, a shorter window is fine.