Some helpful hints on how to stay awake.
First of all, don't lie down. Don't rest your head on a table. Try to stay upright. If you need neck support, lean back on something.
Keep your eyes open. Even when you blink and they don't want to open all the way, keep them open. Blink more to clear your vision, and look around the room without moving your head if it does start to blur.
Exercise. Do wind sprints. 50 meters four times or so works best.
If your at home, try putting one foot in cold water. For some fun, put the other foot in hot water.
Is it raining out? Lets try some self control exercises. Go out, without a coat or umbrella. Here's the fun part (as you guessed): seeing how long you can stay out. Don't stand under things, unless they're actively dripping on you harder than the rain. Stand under the end of a gutter, eve, grotesque, or other runoff. Try doing some exercise outside. When you finally come back inside, take a hot shower.
If you're in class or something else important (meeting, conference, etc.) try digging something blunt but sharpish, like the metal tab at the top of a binder, into your palm. The heel of your palm, or the side opposite your thumb.
Next, try holding your breath. Once you've done that two or three times, hyperventilate.
If you're into drugs, try some speed. Or just lay off the depressants at least.
And remember, you're running on adrenaline, so keep it flowing! Don't stop and rest too much, should it flee your bloodstream.