Yawning is actually a complete mystery and while there are several theories and hypotheses, no one knows, for sure, exactly why we yawn.
In most cases, yawning is involuntary but most people are able to yawn on command. And then there is the contagious nature of yawns and the fact that the mere thought of yawning often triggers yawning.
- not enough oxygen
- Boredom and Stress
I guess it is because of deficiency of oxygen in a body so brain sends a command to yawn
when we are tired and feeling sleepy then we yawn, it think yawing must be linked with tiredness.