I'm not sure if it's the tiredness. The impending deadlines push me into overdrive, which I use to finish work.
But if an all-nighter is truly the only option, then 20 minute naps every 2-3 hours works well combined with a cup of coffee.
Method: Drink a cup of coffee, immediately nap for 20 minutes, wake up and work for 2-3 hours. Rinse and repeat.