A quick 20 min nap is the best way to avoid a problem. Many many times I had been driving late/early and found myself starting to doze. I pullover into a rest stop and a 20 min nap and I was good to go.
20 mins seems to be the key. Any shorter/longer and you don't seem to shake the fuzz off. Unless the longer is several hours... ;-)
Caffeine is only if you must absolutely keep going under all cicumstances. But that brings in other problems like being jittery, shaky, headaches, and other things that may influence judgement.
IMHO...
_________________________
"I reject your reality and substitute my own..." - Adam Savage / Mythbusters