That feeling of falling when you are about to go to sleep is called a hypnic jerk. You are just between awake and asleep when suddenly you are falling. Then you jerk awake and maybe even experience a quick hallucination or two.
When you wake up suddenly for whatever reason, your brain reacts by
searching for stability under your hands and feet. It doesn't detect
it because you are likely lying down. This leads to a panic reaction
similar to falling. Scientists think the brain is simply
misinterpreting your muscles relaxing as falling.