There are several potential reasons for yawning. Most of them seem to center on changes in physical and mental activity levels. Some of the leading theories about yawning include:
Yawning equalizes pressure in your ears. People tend to yawn when they’re in an airplane or car that changes elevation significantly. Doing so helps compensate for the change in air pressure.