MY first suggestion would be caffine, but based on experience you have to be smart about it, if you start out drinking alot of caffine you will crash after a while. ITs best to hold off on the caffine till you really need it, and then slowly ramp up as needed. Also, personally for me walking for a few minutes outside in the cold gets the blood flowing and my brain back in function. IF that doesn't work and you are really screwed cutting yourself also releases the endorphines, but thats probably not a good idea to pull until final exam time.