Surely, you all have in mind that strange feeling: You just fell asleep and woke up because you felt that "something shook" your body and woke you up. Your heart beats faster and you need a few seconds to fall asleep again. Don’t worry, as it is something that happens to most people from time to time.
Why does this happen?
According to experts, this is an indication that your body is tired during the day. When you immediately fall asleep after a very tiring day, the brain does not have time to return the body to its normal state.
The brain receives messages that the body is extremely tired and the body can stop functioning, so as if it were a magic formula creates a dream that makes you shake and wake you up. You may see a dream as if you were falling, as is most common.
This mechanism is another wonderful proof that the human brain protects the body from dangers, even when we are completely unconscious.
Source: Higher Perspectives