A study by the Department of Biology of Binghamton University found the primary purpose of yawning is to control brain temperature.

The finding solves several mysteries about yawning, such as why it's most commonly done just before and after sleeping, why certain diseases lead to excessive yawning, and why breathing through the nose and cooling off the forehead often stop yawning.

It's now believed yawning operates like a radiator for birds and mammals.

If air in the atmosphere is cooler than brain and body temperatures, taking it in quickly cools facial blood that, in turn, cools the brain and may even alter blood flow.

The study changes the popular notion that yawns are mere signs of boredom. On the contrary, yawning more accurately reflects a mechanism that maintains attention, and therefore should be looked at as a compliment.