The brain encodes huge amounts of information, but only a small fraction is stored for a longer time. There is now compelling evidence that the long-term storage of memories preferentially occurs during sleep. However, the factors mediating the selectivity of sleep-associated memory consolidation are poorly understood. Here, we show that the mere expectancy that a memory will be used in a future test determines whether or not sleep significantly benefits consolidation of this memory. Human subjects learned declarative memories (word paired associates) before retention periods of sleep or wakefulness. Postlearning sleep compared with wakefulness produced a strong improvement at delayed retrieval only if the subjects had been informed about the retrieval test after the learning period. If they had not been informed, retrieval after retention sleep did not differ from that after the wake retention interval. Retention during the wake intervals was not affected by retrieval expectancy. Retrieval expectancy also enhanced sleep-associated consolidation of visuospatial (two-dimensional object location task) and procedural motor memories (finger sequence tapping). Subjects expecting the retrieval displayed a robust increase in slow oscillation activity and sleep spindle count during postlearning slow-wave sleep (SWS). Sleep-associated consolidation of declarative memory was strongly correlated to slow oscillation activity and spindle count, but only if the subjects expected the retrieval test. In conclusion, our work shows that sleep preferentially benefits consolidation of memories that are relevant for future behavior, presumably through a SWS-dependent reprocessing of these memories.