The caffeine nap, done properly
If you have more than 90 minutes of work and the stop rule has not fired, the most useful tool is the short nap, and the timing matters more than people think. NIOSH's guidance for someone on a daytime schedule is a brief nap of under 20 minutes, with an alarm set for 15 to 30 minutes. Naps that run past about an hour reach deep sleep, and waking from deep sleep brings sleep inertia, the thick-headed feeling that NIOSH says clears within 15 to 30 minutes after lighter sleep and lasts longer when you are very sleep deprived.
The sequence: drink the coffee, set the alarm for 20 minutes, lie down, get up when it rings whether or not you slept. The caffeine's 30-minute onset lines up with the end of the nap. Then allow 15 minutes before anything that needs sharp thinking. If you cannot trust yourself to get up, nap sitting in a chair, not in bed.
One more number from NIOSH: caffeine's half-life is five to six hours, and it can stay in the system much longer. A coffee at 11 pm is still about half there at 4 or 5 am. If tonight's plan ends with sleep before the exam, make the caffeine nap the last caffeine of the night.