To echo Badprenup, don't do it. I tried it once, and my god it was horrible. I had hallucinations of Rocket League by the end of it, to the point where I was unconsciously moving my thumbs to play a freaking hallucination on the wall. If you really want to (and I don't recommend it)
bring good ol' fashioned coffee. Energy drinks make you feel like crap afterwards.
Move around every so often. Sitting in one place for a long period of time is bad for you.
Bring lots of water, especially if you're drinking caffeine.
If you start hallucinating, or get a headache, start crashing, or you just feel drained, either stop completely or take a really long break. I cannot stress this enough. Not quitting when you should is going to wreck your body even more.
Again, I wouldn't recommend it. It's a bad idea. The only real benefit is that you will have the deepest, most refreshing nap ever. Other than that, at the end you feel sore, cramped. thirsty as all hell, and in general just a hot mess.