The sudden startled jolt awake sometimes experienced when on the verge…

The sudden startled jolt awake sometimes experienced when on the verge of sleeping is known as a hypnic jerk, and is likely a vestigial reflex selected to help primates avoid falling while resting or asleep in trees.