“Rapid eye movement sleep (REM sleep or REMS) is a unique phase of sleep in mammals and birds, distinguishable by random/rapid movement of the eyes, accompanied with low muscle tone throughout the body, and the propensity of the sleeper to dream vividly.”
First described in the mid 1950s, REM sleep is known to be an essential component of healthy sleep. Why the eyes move rapidly, what regulates REM episodes, and what is the precise function of REM sleep are questions yet to be answered - though there are at least 8 currently competing theories. While other scientists maintain that has no purpose at all, and simply results from random brain activation.
Further reading : Wikipedia