Another possible explanation might be that as you’re drifting off to sleep, your brain misinterprets the relaxing of your muscles as a sign that you’re actually falling and signals your muscles to tense up, in order to protect you.
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. However, most hypnic jerks occur essentially at random in healthy people.