As a medical student, going through residency can be a character-building experience. Night shifts – or floats – can mean long hours of staying awake and alert. And when we say long hours, we mean 20 to 40 hour shifts, sometimes for nights in a row.
According to a 2017 article from The Atlantic, American medical residents endure 80 hours a week, or even longer: 
Residents in America are expected to spend up to 80 hours a week in the hospital and endure single shifts that routinely last up to 28 hours — with such workdays required about four times a month, on average.
This may sound like a superhuman task (and it is). This challenging set up remains to be controversial, with health experts concerned over adverse impact and added health risks for both the residents and their patients.
Indeed, working extra-long hours can take a toll on anyone; various studies and reports show how sleep deprivation can affect physical and mental functions that are key in providing care and saving someone’s life.
Our article “For Doctors and Nurses, Long Hours at Work Mean More Errors” reports research findings that show how long hours affect patient safety:
that work duration, overtime, and number of hours worked per week had significant effects on errors. The likelihood of making an error increased with longer work hours and was three times higher when nurses worked shifts lasting 12.5 hours or more (odds ratio =3.29, p =.001). Working overtime increased the odds of making at least one error, regardless of how long the shift was originally scheduled (OR = 2.06, p = .0005).
Another study in Nursing Times says: 
We found that both longer shifts and working overtime were significantly associated with lower quality of care, worse patient safety reports and more care left undone (p<0.05). Compared with nurses who were working eight hours or fewer, the odds of nurses who worked 12 hours or more on their most recent shift describing the quality of nursing care in their unit as “poor” or “fair” increased by 30% and the odds of them reporting “failing” or “poor” patient safety in their units increased by 41%.
But while concerns on long night shifts exist, the situation remains. Medical residents have to endure extended hours if they want to pursue their dreams of becoming a full-pledged doctor.
The good news is that there are ways to manage these extended hours. And we’ve researched how medical residents have successfully stayed on top of this long, gruelling hours in the hospital.
Here are some tips to survive medical residency… alert, alive and kicking:
It’s always a good idea to make sure you are not sleep-deprived going into a night shift. A 90-minute nap before your shift can prepare you well enough for the long hours ahead.
Stay away from things that could only disrupt sleep. Avoid alcohol, sedatives and caffeine a few hours before you need to sleep. Steer clear of blue light and lessen the use of digital devices at least an hour before you sleep.
Before running yourself down, take every opportunity to squeeze in a power nap.
We’re not saying that you should always stay in sleep capsules or snooze when you should be in the emergency room. But the best strategy to combat sleepiness during your shift is to try as much as possible to schedule (or squeeze in) these power naps.
To make the most bang for buck, limit your naps to half an hour. Micro-naps that are only 30-minute long could help you get rid of that “groggy” feeling when you wake up. Here’s how to make the most of power naps. By combining this tip with the next item, you should be feeling recharged and focused.
This tip is almost common sense and the go-to hack for most medical residents. Having a couple cups of joe during the shift can help you stay awake. Caffeine has a lot of benefits, and for extended hours on a night shift, increased alertness and mental focus can help you survive the demanding hours.
Power tip: some residents talk about halting caffeine intake after midnight (or at the middle of the shift) so they would find it easier to fall asleep after work. Some would even keep it to a minimum.
If you are one to mindlessly reach out for the next cup of drink every time you finish one, then we suggest alternating a cup of coffee with caffeine mints. Viter Energy Mint only has 40 mg of caffeine for every pop, so it’s easier to keep caffeine intake to a minimum or microdose your intake.
Remember also to use caffeine to your advantage. Drink a cup or take a pop of caffeine mint to stay alert, not to wake up when feeling sleepy. According to Dr Smita Patel, DO, a senior clinical educator at the Pritzker School of Medicine at NorthShore University HealthSystem in Chicago, “caffeine can help you with some of the that lag and lull, but it doesn’t replace the actual sleep you need.” 
If you feel like you are exhausted, go back to item #2 or refer to the next one.
If you can’t find the time to squeeze in a nap, then resort to movement and physical activity.
Walk up and down the stairs, or around the hospital. Go outside and allow the crisp air to wake you up. Listen to music and run a playlist that helps keep you awake. Hang out with the nurses and engage in conversation with them (provided you do not interrupt their work). Talk to patients and their family who are still awake. Watch TV in the call room. Splash cold water on your face.
Even better, squeeze in a 30-minute exercise. According to the Harvard Medical School’s Harvard Health blog, exercise does a lot of wonders in memory and thinking. “Indirectly, exercise improves mood and sleep, and reduces stress and anxiety. Problems in these areas frequently cause or contribute to cognitive impairment.” 
Several residents bring food that are easy to prepare and help keep them awake. Some of the more common snack ideas include:
If you often find yourself going to a room in your house only to forget what you’re meant to do, or talking about a movie character you’ve seen so many times but can’t remember the name of, then one thing is going on.
It’s so easy to dismiss these as simple moments of forgetfulness. But if this happens a lot, then it may be your body sending you a signal to do something and beat brain fog.
The writer, Dan Charles, bought a 4-ounce bag of caffeine and said it had as much caffeine as 1,000 tall Starbucks lattes. He said this caffeine was created in coffee beans on a hillside in the tropics. “Slowly and quietly, driven by the energy of sunlight, it formed inside coffee beans hanging on thousands of trees, most likely in Brazil or Vietnam,” Charles wrote.
“Those beans were harvested, loaded on ships bound for the port of Houston, Texas, and ended up at a factory within sight of downtown Houston: Atlantic Coffee Solutions. It’s owned by one of the world’s largest coffee traders, ECOM Agroindustrial Corp., which is based in Switzerland.”
Coffee was so important in wartime America during World War II that the government rationed it briefly so soldiers could get enough. Coffee was one of four staples for Civil War soldiers, along with beans, beef and hardtack. After Boston Tea Partiers dumped that tea in the harbor during the Revolution, coffee drinkers were considered patriotic.
Coffee can give a soldier the alertness he needs in times of prolonged sleep loss or during dangerous combat situations.