As you fall asleep all your muscles relax and your head falls forward. As your brain senses the momentum of your head falling forward it wakes you up and you fall into the ongoing cycle of the proverbial “head bob”.