It has long been thought that the amount of time spent in different stages of sleep was responsible for how well people were able to remember things.