Being the geek I am, I usually stay up a minimum of 24 hours when I'm really interested or concentrated on a subject. Below, I'll point out what I do, for those that want to accomplish the feat.
Increase your sugar intake, not by sugary drinks though. Small candies (gummy worms, etc. )worked the best for me. Last thing you want to do is crash.
Get a good nights sleep the night before.
If you must have caffeine, go for '5/6 hour energy' shots, or '6 hour energy' pills (which happen to be cheaper than the shots). Try to avoid sugary energy drinks (Monster especially). My energy drink of choice is the almighty Citrus BooKoo.
- Keep hydrated
If you ran out of your favourite beverage, keep hydrating yourself with water. You can't fall asleep if you're about to piss yourself.
- Take a shower, if needed
Simple, just take a shower. Don't get too relaxed though. If you're not able to take a shower every X amount of hours, change your socks and/or clothes.
Try to keep the room temperature somewhere between semi-comfortable and a tad chilly.
- Be active
Be active daily, work out etc. the day before staying up for extended periods. If you're sitting at a computer (which you most likely are), stand up, walk around, sit on the couch (but don't get too comfortable).
Listen to something tolerable, but not soothing. I tend to listen to [dark] psytrance, and I'd suppose the drumming beats keep me alive. Go for something loud, but consistent.
Of course, staying up for extended periods of time, is not healthy whatsoever. Sleep is very important to maintain a healthy lifestyle.
And I guess that's it. For now, that is. If you have any comments or ideas, feel free to comment.