A recent study published by Berkeley UC concluded that an hour nap boosts the brain's learning capacity and restores power, just like an email box. When it's full, it needs a cleaning session - which is just what the nap does.
So of course, what every student had to learn the hard way, when you study and do an all nighter, your brain's efficiency goes down a lot; according to the researchers, about 40%. This happens because some of the regions in the brain basically shut down to save energy, so you need sleep to work at full power.
The study went even further and concluded that the more you stay awake, the harder it will be for you to learn new things. From what I can understand, it's actually better to remove an hour of night sleep and add it in the evening, if nothing else is possible. Learn more about napping.