In my experience it gets more complicated depending on the days leading up to the event. Given good sleep for a good stretch of days up to the day before the exam, all-nighter can work out fine. But I guess there is a correlation between lack of discipline to get good sleep and not studying regularly so I can see that being a rare situation :-)