We humans spend almost a third of our lives asleep, and there is mounting evidence that sleep not only maintains, but actually improves many of our cognitive functions. Memory consolidation--the process of crystallizing and integrating memories into knowledge and skills--is particularly benefitted by sleep. We survey the evidence that sleep aids memory consolidation in various tasks--declarative and implicit--and review the basic neurophysiological structure of sleep with a focus on understanding what neural systems are involved. Drawing on research in machine learning, we discuss why it might be useful for humans--and robots, perhaps--to have such an offline period for processing, even though we are clearly capable of learning incrementally, online. Finally, we propose several mechanisms for use in computational memory models to approximate sleep-based consolidation.