We yawn typically when we feel drowsy. It helps to cool the brain but has little effect on oxygenating our blood.
When we are fatigued, our bodies want to relax or sleep.
The rate of breathing decreases when we feel tired. We yawn as a result of our lungs not receiving enough oxygen.
Yawning helps us stay awake by bringing more oxygen to the lungs.
On the other hand, evidence from several fields of research is increasingly supporting the idea that yawning has a communication purpose in the transmission of tiredness, boredom, or moderate psychological tension.
The action repertoire of highly developed social and empathetic abilities includes yawning in humans and several other creatures.