A look at the science of the spasms that strike as you doze off, known as hypnic jerks:
As sleep paralysis sets in remaining daytime energy kindles and bursts out in seemingly random movements. In other words, hypnic jerks are the last gasps of normal daytime motor control. … So there is a pleasing symmetry between the two kinds of movements we make when asleep. Rapid eye movements are the traces of dreams that can be seen in the waking world. Hypnic jerks seem to be the traces of waking life that intrude on the dream world.