It depends on how much longer you need to stay awake and what you've got access to. Eating something with lots of carbs will wake you up for a little while. Jogging in place for a few minutes will help too, if you're able to do it.
“but what should we do when the highborn and wealthy take to crime? Indeed, if a poor man will spend a year in prison for stealing out of hunger, how high would the gallows need to be to hang the rich man who breaks the law out of greed?” Terry Pratchett, Snuff