What part of "cramming does not work" didn't you understand?
Retention of "crammed" information is exceedingly poor and is generally stored in synapses designed for short term retention, which generally "dump" the information contained within to make room for the next round of "mundane" stimulus. Meaning, when you get in the car and read a stop sign, you're already losing what you just crammed. You may end up remembering one or two questions and feel you were successful at preparing for the test, but you will miss many more. Long term retention (more than 8 hours) and solid formation of specialized synapses requires re-examination of the information at least three times, and is better facilitated by re-enforcement by more than one sense. (ie. hearing AND reading)
There are a blessed few that have picture perfect photographic memories. If our young friend was one of those, he wouldn't be pulling an all-nighter to begin with.
I have to add something here, no hard evidence except first hand experience. You can make cramming work if you manage to refresh everything often enough, even just a little, long enough for it to settle into (I guess) long term memory. Back in early high school I memorized 10 pages of spanish text from about an hour of reading it full speed, over and over.. Then 10min of waiting lined up outside of class with everyone chattering and me alternating between that and running thru the material.
I did forget most of it within a couple of days after the test, from what I remember.
And no, it's not a good idea to do this exhausted, over night. It's not just deminishing returns, but deminishing everything, a lot like taking a driving test drunk. Even if you know the material, you're handicaped.