All-nighters before exams aren’t a good idea as sleep is vital to memory.