Well then, if you've decided to read this, that probably means that you either wish to stay up all night, are staying up all night to be bored enough to read this, or have drifted off by the end of this sente.....
So anyway, the art of the all-nighter as experienced by me!
Why stay up all night?
The chances are you probably actually already know the answer to this question. Normally it comes down to a few small reasons.
1. Work/Revision - This is the main reason, and actually the hardest to succeed in the all-nighter with, because of the tendency of the mind to wander.
2. Sleeping pattern - For the nocturnal-types among us who may have night-time shift-work. I'm looking at you, doctors/nurses!
3. Insomnia/Depression/Illness - For the poor unfortunate souls among us who have tried everything to get to sleep but just know it isn't going to happen. Don't worry, we've all been there at some stage.
and 4. The people who come in from getting bladdered to the eyeballs realising they'd be better off staying up and going to their 9am lectures than risk sleeping!
Food - Especially if you're intending to do a large amount of work over the night, it is vital to keep your energy levels high. Remember kids, a Mars a night helps you work, work and....fight?
Drink - ...and I don't mean the bottle of Jack longingly staring at you from the corner of the table. I mean water, and lots of it. It's amazing the difference a mouthful of water can make when you feel yourself starting to drift off while gazing wearily into Word. I usually suggest taking a decent sip every half-hour.
Entertainment - Nothing helps keep you awake like something that helps keep you occupied! Whether it's iPlayer, your Xbox or just iTunes, it helps greatly to have something to keep your brain functioning while you ponder over what to write next.
Seating - Make sure it's uncomfortable. ...I mean it. If you get too cosy you will start to drift off, and there's nothing more embarrassing than housemates coming in in the morning to find you slumped over your laptop the following morning with a series of 20000 jumbled letters on the screen!
Breaks - Breaks are vital. After an hour, take a 15 minute break. Walk around the house to keep you occupied if you need to. Stand outside. Get some air. Watch the revellers stagger in from wherever the night took them. All these things are good.
What to do if you start to drift off
There's a lot of things you could do if you start to drift off, although I don't recommend bashing your skull on the desk at that time of night myself.
You could try making use of the entertainment you have provided yourself with, there's always plenty of online Flash games. And Sporcle. And Facebook. Or you could try writing a Wiki article on here like me, currently pulling an all-nighter when I should really be checking up on Group Theory - priorities right, I think. :H
Don't forget the nutrition as well, and that extra half an hour is only a gulp away!
What you shouldn't do
Fairly self-explanatory this one. Don't, for example, put a dog eating chocolate while wearing a tin-foil hat in the microwave. It's just not cool.
Basically, anything involving a lot of noise or strobe lighting is a bad idea. No discos in the hallway. No Neil Pert-style drum solos. Be careful if you have music on as well, make sure that bass level is turned right down. ;)
If you've managed to stick to these goals then you should be a fully-trained all-nighter-er (I don't know what it's called...insomniac?).
If you intend to do the same the following evening I cannot stress highly enough the importance of sleep of some kind during the day in-between. It's not healthy to go without sleep for long periods. In my experience it only aids depression.
Please note that this is from personal experience and should not be followed entirely religiously. Other people may have other advice to give but the broad outline is contained in here. :)