In a TED Talk entitled 'Hacking Your Memory --- With Sleep' scientist Matt Walker walks the viewer through the different ways the brain and sleep are connected, and how a good night's sleep can change the way memories are stored.
Walker appeals to the listener by stating that sleep may be "your secret memory weapon." Science has taught us that sleep is important to memory function in multiple ways. First, you must get a good night's sleep before learning in order to fully retain the information. With that same logic, Walker explains, without sleep the brain's memory circuits fail to hold onto new information. More than that, Walker continues by saying that in addition to getting a good sleep before learning, you have to get a good sleep after learning as well, in order to "hit the save button on what you know."