Sleeping and waking adjust themselves to the demands and risks of our life, not according to what the health manuals say. The other theory is that sleep’s primary purpose is memory consolidation. Learning. In recent years, brain scientists have published an array of findings suggesting that sleep plays a critical role in flagging and storing important memories, intellectual and physical.