The short answer is that no one really knows.
The long answer is that no one really knows, but there are plenty of interesting theories:
1. The idea that we yawn to get rid of carbon dioxide and take in more oxygen has been disproved by research, but persists as the "common wisdom" answer. According to this theory, people breathe more slowly when they're bored or tired and less oxygen gets to the lungs. As CO2 builds up in the blood, the brain reflexively prompts a deep, oxygen-rich breath.
The problem with this theory is a 1987 study by Dr. Robert Provine, who is regarded as the world's foremost yawn expert. Provine set up an experiment in which volunteers breathed one of four gases that contained varying ratios of CO2 to O2 for 30 minutes. Normal air contains 20.95% oxygen and 0.03% carbon dioxide, but neither of the gases in the experiment with higher concentrations of CO2 (3% and 5%) caused the research subjects to yawn more.
Last year, a team of researchers at the University of Albany proposed that the purpose of yawning is to cool the brain. They conducted an experiment similar to Provine's and again found that raising or lowering oxygen and carbon dioxide levels in the blood did not change the amount or length of yawns.
Subsequent experiments focused on two well-established brain cooling mechanisms: nasal breathing and forehead cooling. When you breathe through your nose, it cools the blood vessels in the nasal cavity and sends that cooler blood to the brain. Likewise, when you cool your forehead, the veins there, some of which are directly connected to the brain, deliver cooler blood. The researchers found that their test subjects with warm or room temperature towels pressed against their heads yawned more than those with cold towels. Subjects who breathed through their noses during the experiment did not yawn at all.
The researchers said their evidence suggests that taking in a big gulp of air with a yawn cools the brain and maintains mental efficiency.
3. Another theory says that yawning has more to do with sociology than physiology and also tackles the question of contagious yawning.
Almost all vertebrates yawn spontaneously, but only humans, chimps and macaques yawn as a result of watching another individual do it. Given that these are social creatures that live in groups, the contagious yawn may have evolved as a way to coordinate behavior and maintain group vigilance. When one individual yawned, the group took that as evidence that their brain temperature was up and their mental efficiency was down. If all members of the group then yawned, the overall level of vigilance in the group was enhanced. In humans, who have color-coded charts to signal how vigilant they should be, yawns may still be contagious as a vestigial response.
While yawns are still largely a mystery, here are some things we know for certain:
"¢ The average yawn lasts about six seconds.
"¢ In humans, the earliest occurrence of a yawn happens about 11 weeks after conception "“ while we're still in the womb.
"¢ Your heart rate can rise as much as 30% during a yawn.
"¢ 55% of people will yawn within five minutes of seeing someone else yawn.
"¢ Blind people yawn more after hearing an audio tape of people yawning.
"¢ Reading or even thinking about yawning can cause you to yawn.
"¢ While researching and writing this story, I yawned 37 times.