Sleep helps in stabilizing and integrating new memories. During various stages of sleep, particularly slow-wave sleep (SWS) and rapid eye movement (REM) sleep, the brain processes and solidifies experiences and information acquired during the day(short-term memories). This process enhances the ability to recall information and skills learned.
Source: The mind at night.