Eat carbohydrates. Eating pure/high carbohydrate snacks has been shown to have an interruptive effect on diurnal rhythms.
That's quite recent research, but for years I used to use cereal or sandwich snacks to keep myself awake all night, without any caffeine at all. I was studying, albeit informally, and it certainly never had a negative effect on my recall - quite the opposite.
Be warned though - add the protein tryptophan - to the carbohydrates, and you will instantly get sleepy, as this will cause a spike in serotonin levels in the brain, triggering the need for sleep. So no meat or milky drinks.
Personally I would allow myself "micro-naps" - tiny snoozes of as little as ten minutes - they will add enormously to your efficiency while awake.
But of course the problem is making sure you wake up.
Are you taking B12 ? As it catalyses stress reactions within the body ( in conjunction with other B complex vitamins) your body will be demanding far more of it, and you might well find that taking a B12 or general B complex supplement will help fight fatigue. (Best taken after food and a glass of water.)
Best of luck with the exams !