Alright, so you want to pull an allnighter. My best tips are as followed
1. Play in a comfortable area, don't hunch over for long periods of time. If you can use a laptop and maybe sit up on your bed.
2. Keep snacks nearby, they definitely help.
3. DRINK WATER, this is really essential.
4. Drink a redbull, monster, or nos. These work best. Don't drink a lot of them, and still keep water as your main source of hydration.
5. Take a caffeine tablet, probably only take one.
6. Have a lamp or something nearby, so it isn't dark and you wont fall asleep as easy as you would if it was dark.
7. If you can't make it through the night, don't push yourself, its unhealthy.
8. Once the allnighter is over, make sure you get adequate rest, and try to not do it very often as it isn't that healthy.
Sources : Personal experience of nerding out on games overnight.