Sleep sorts your memories
At night, the brain replays the day's learning and files it into long-term memory. Revising in the evening and then sleeping is an excellent strategy before an exam.
Robert Stickgold and Matthew WalkerResearch on sleep and memory