In college I used Mountain Dew and NoDoz. When I worked in investment banking, it was coffee and cigarettes. In grad school, I added black tea to the caffeine and nicotine mix.
As it turns out, none of these concoctions is a particular healthy one to survive working an all-nighter. Which is what they were being used for. However, I wasn’t too far off with at least one part of my homemade all-nighter survival remedy.
In a recent BBC.com article entitled “What the sleep doctors won’t tell you,” Dr. Charles Czeisler, a sleep professor at Harvard Medical School, says coffee isn’t necessarily a bad thing for getting through an all-nighter effectively. He advises those who must work an all-nighter to "use caffeine strategically”—drink “a cup of coffee at hourly intervals throughout the night.” Czeisler also advises those who know they’re going to have to pull an all-nighter to take an afternoon nap on the day of the big night. “If we take a mid-afternoon nap, the decrease in performance which normally occurs as we work on will be much less."
But if you don’t have time for an afternoon nap and/or caffeine gives you the shakes, you can try some chicken or peanuts. That’s what Paula Mee, a dietician, nutrition consultant and broadcaster based in Dublin, told the BBC will help during the dark hours of the night: "Protein keeps us alert. So the evening before you are going to stay up all night have a meal which is rich in protein, for example a chicken breast or a salmon cutlet. Too many carbohydrates can make us sleepy … You do not need to have another full meal during the night, our bodies have reserves for events like this. But mid-way through the night you could have a protein snack, perhaps some nuts and seeds, to help keep you alert."
Other recommendations by sleep experts include working in blue light (“research shows a blue-tinted light will wake you up best, such as a blue-LED light"), keeping warm (“you don't want to be distracted by being cold”), and tackling your most difficult tasks first (“divide your tasks in to two categories: cognitive tasks, which require thinking and computing, and other tasks which are more routine ... the more routine and pedestrian tasks should be done later”).
It’s no surprise that sleep experts also highly recommend against pulling all-nighters if you have a choice since "sleep deprivation has a very strong impact on your health.” So you definitely don’t want to make them a habit. But all-nighters in very small doses, and done right, shouldn’t kill you.
As for the day after an all-nighter, although it’s likely you’ll feel something close to euphoria if you've completed what you set out to do during the night, you don't want to be operating heavy machinery, which includes an automobile. According to WebMD, “Studies have shown that after an all-nighter, you may be functioning at a similar level as someone who is legally drunk.” What you should do, if you can, is take a nap, even if it's a quick ten-minute one. If that's impossible, and more work calls, you can hit the caffeine again, but watch your intake.