A Hypnic Jerk is “a feeling of falling” we get sometime just before we fall asleep.
"According to the American Academy of Sleep Medicine there is a wide range of potential causes, including anxiety,caffeine, stress and strenuous activities in the evening. Another theory often cited as a cause, is an evolutionary trait found in most primates; the brain misinterprets muscle relaxation and onset of sleep as a signal that the sleeper is falling out of a tree, consequently awaking suddenly. The reaction may have a selective value, prompting the sleeper to readjust position to ensure a fall did not occur." -Wikipedia
Now you know.