Sleep enhances memory consolidation by promoting the transfer of information from short-term to long-term storage. During sleep, particularly in the slow-wave and REM stages, brain activity strengthens synaptic connections, processes learned information, and integrates memories, aiding in retention and retrieval.