Scientists don't know exactly how sleep enhances memory, but it seems to involve the brain's hippocampus and neocortex. That's the part of the brain where long-term memories are stored. It's thought that during sleep, the hippocampus replays the events of the day for the neocortex, where it reviews and processes memories, making them long term.