A new study in mice provides direct causal evidence that rapid eye movement or REM sleep helps to consolidate memory in the brain. The link between REM sleep and memory has been long been considered by scientists, but the transient nature of REM sleep, along with the ethical concerns of experimentally depriving humans of REM sleep, make it difficult to study. To get a closer look at what happens in the brain during REM sleep, Richard Boyce and colleagues used an optogenetics technique that allowed them to use light to selectively silence neurons in the mouse hippocampus during REM sleep, inhibiting the signaling patterns called theta oscillations that are thought to be involved in learning and memory. Without disturbing the sleep of the animals, the researchers showed that inhibiting theta oscillations during REM sleep kept the mice from forming both contextual memories (such as the location of a new and interesting object) and emotional memories (such as the fear associated with receiving a mild foot shock). Disrupting these same oscillations outside of REM sleep, however, had no effect on these memories. Bernat Kocsis discusses the results in a related Perspective.