Caffeine pills - you can regulate your caffeine intake because each pill is a precise amount of caffeine, and they don't irritate the stomach like coffee or other energy drinks. Don't let the pill scare you - it's no different than pounding coffee. Just don't over do them and you'll be good.
And NAP when you feel like napping. Seriously, if you're tired you're studying inefficiently, get rest, wake up, get back to it.
Oh, and get yourself an ambien prescription. I'm not saying caffeinate so strongly that you need ambien to sleep - don't do that, don't take caffeine in the run-up to bed time. I'm just saying that for me, it was awesome KNOWING I could get to sleep at X hour no matter what - otherwise, under stress, I have trouble getting full restful sleep, which is KEY come finals day.
I was doing my best not to suggest depressants to counteract the stimulants (very few substance-savvy folk would), but if you take this advice then test it out before finals day. Sleeping pill hangovers are a common side effect. Depending on the person it can be completely counterproductive.
That may be true for some - consult a doctor - but for me I wake up from ambien fresh as a fricken daisy. You allude to something valid - I'm uh, not a rookie when it comes to dealing with substances and planning for their effects. And let me be clear - I would not take caffeine within six hours of bed time whether I was going to take ambien or not. That is a bad idea. I was not suggesting ambien as a counter to caffeine, but rather as a separate, unrelated thing to get a full night sleep (the topic was drugs in aid of study so I felt the ambien germane to the subject).
So if I had an exam at 1pm, I knew that ambien would let me sleep for 7 hours and I needed an hour and a half to get to get my shit together and get to the test site, so I'd study until like 4:30 am, pop the pill, and be fresh as hell when I got up at 11:30.
I'd arrive to an exam and half my peers looked haggard and exhausted, while I was fresh off a long deep rest. That had to have been a help come the stress of test time. I'd take a pre-test dump, slam a red bull immediately when the exam began, and then was off. It worked for me, but you gotta do what works for you.