Sleep is important for maintaining memory. During sleep your brain consolidates and firms up newly acquired information. Studies show that people are better at remembering recently-learned information the next day if they have had a good night's sleep.
What Exactly Is Memory?
Here's some interesting info about memory and types of memory problems.