I was a caffeinated worker for the past 38+ years. I quit cold turkey back in January with only an occasional cup a couple-three times a month if that. If I got tired, especially at work or on a long trip on the motorcycle, I would pop a "Commando Coffee" into my mouth. 20 minutes later I was ready for the most extreme twisty roads! Commando Coffee = Folger's Single teabag style coffee - pull off the string and pop that into your mouth like a Skoal bag. Yep, it's going to be an intense coffee flavor but you get to swallow the juice and get a kick in the brain!
I've had days where I was falling asleep on twisty roads in the truck only 10 miles from home. Best thing to do is a 10 minute nap if you are that tired. It's amazing how much 10 minutes closed eye time can do for you to regenerate your alertness. No sense in falling asleep behind the wheel or the sticks. Safe is not stupid.
If I have major drowsiness issues, I always keep a hammock in the cab of a machine. Clear a spot near a medium size tree in the shade and then use the push bar to fine tune the hammock's slope. 30-45 minutes or so of rest and I can work well into the dark on a long day. Feed your body the shut eye time it needs - no amount of caffeine can compensate if you get really tired. I've overdosed on caffeine a few times trying to stay alert and unless I tried a stronger drug, which I won't do, needed sleep is the only cure. Even 5-10 minutes of shut eye makes the difference for a quick reset of the brain.