When I was younger, I used to pull all nighters either working or gaming. Nowadays, I tend to sleep through the nights as my productivity level is so much better the next day.
I read somewhere that you should get at least 8 hours of sleep per night as those with less sleep tend to have increased risk of premature death.