Want to ace that test tomorrow? Here’s a tip: put down the coffee and hit the sack. Scientists have long known that sleep, memory, and learning are deeply connected. Most animals, from flies to humans, have trouble remembering when sleep deprived, and studies have shown that sleep is critical in converting short-term into long-term memory, a process known as memory consolidation. But just how that process works has remained a mystery.