Take stops and walk around or do something every 2-3 hours. I sometimes will bring medicine ball and do a quick 5 minute workout. Get those legs moving.
Caffeine works, but you have to use it correctly. If you use it to push yourself too far, you can crash and crash hard at the wrong time.
Veggies and vitamins are critical. Those overpriced $4.00 Odwala green smoothies are like a powerboost and in conjunction with good hydration and caffeine can keep you feeling good for hours. Similarly, stay away from junk food, fast food and especially any food (Asian foods) with MSG in it.