Students have sometimes found that after a good night's sleep they are able to remember very well material they studied the night before. This often is the case, but you can't count on it. Some scientists think that sleep does indeed have an effect on memory, and to try to get a handle on these effects they have done experiments involving different stages of sleep.
The 5 Stages Of Sleep
Sleep is divided into five stages, including the one called the rapid eye movement, or REM, stage. In the course of a night's sleep you go through the various stages several times, but it is only during REM sleep that dreaming occurs, and it is this stage which has the most profound effect on memory.
You can recognize when someone is in REM sleep, because you can see their eyeballs moving underneath their closed eyelids.
In one study subjects were trained to recognize several patterns of lines a few hours before they went to bed.
The experiment found that the volunteers could perform the tasks faster the next morning if they had a good night's sleep. If they were awakened each time they entered REM sleep, they did no better than the night before. If instead they were awakened during non-REM sleep they performed just as well as when they slept undisturbed.
Sleep And Memory
The researchers concluded that REM sleep, and perhaps even dreaming itself, help cement things in memory. The catch is that your REM sleep must not be disturbed, and controlling that is not as simple as hanging a "do not disturb" sign on your door. You can be awakened from REM sleep by dreams as well as a knock at the door.
So, it could well be that if you want to increase your chances of remembering something, study it before you go to bed.