I honestly try not to pull all-nighters due to an experience from high school where I worked an 8-hour shift(work-study) the day after and fell asleep while driving home, totalling my car.
If you really want to stay awake though, I'd suggest devoting an hour or two in the late afternoon or early evening to sleep. Usually, that will keep your body running for a good 16 hours. As long as you are having on average, 7 - 8 hours of sleep per day, you should be fine with the occasional all-nighter. The real problems(especially work and health-related) start to kick in when you make it a habit though so make sure to consider moderation when you find yourself repeatedly putting off sleep.
If you really want to stay awake though, I'd suggest devoting an hour or two in the late afternoon or early evening to sleep. Usually, that will keep your body running for a good 16 hours. As long as you are having on average, 7 - 8 hours of sleep per day, you should be fine with the occasional all-nighter. The real problems(especially work and health-related) start to kick in when you make it a habit though so make sure to consider moderation when you find yourself repeatedly putting off sleep.