Why do your eyes roll from side to side whenever falling asleep sometimes?

REM. Sleep initiates the occurrence if rapid eye movements or rem. Rem is generated in the brainstem without effort just like your breathing.
Rem. Rem (rapid eye movement) occurs during some parts of the sleep cycle.