Yawning is weird
Everybody knows you yawn because you are sleepy, right?
Not quite! Correlation is not necessarily causation.
It turns out yawns are super weird.
Before we unpack the data on yawns, I should point out that the research on yawning is contentious...there are a lot of pet theories and (seemingly) nutty hypotheses floating around. Fortunately at least a few scientists are trying to understand this basic piece of biology.
So why do we yawn?
For starters, yawning is very old evolutionarily. Elephants, cats, gorillas, sheep, camels, rats, walruses...it seems all mammals yawn. You can find videos of birds yawning, and there is even evidence that fish yawn. Some scientists think that oscitation (the fancy term for yawning) occurs in all vertebrates, which would even include reptiles and amphibians.
While the idea of a fish yawning may sound bizarre, consider that yawns are closely related to swallowing. The brain regions that control swallowing are shared with yawning, and one study showed that 85% of yawns are associated with spontaneous swallows. Since swallowing is absolutely critical for complex digestive tracts, it makes sense that yawning is similarly conserved across many species.
Yawns, like swallowing, are also largely outside of our conscious control. Sure, you can fake a yawn or force yourself to swallow, but you don't normally think about those actions. In fact, people who are "locked-in" (completely paralyzed but brain active) still yawn. You also can't stifle a yawn once it's begun...you may try and hide it, but the pattern is still going to run. Disagree? Try and stop mid-swallow and let me know how that goes.
Okay, but why do yawns occur when we are tired? That has nothing to do with swallowing, right?
Like many body systems, yawns appear to have been co-opted for multiple purposes, both physiological and sociological.
Physiological Yawning
This is the kind of yawn that makes you say to yourself, "Hmm, I guess I'm pretty tired,” because it often happens while you actually are tired.
There are (at least) three different theories for physiological yawning: Oxygen Theory, Attention Theory, and Temperature Theory.
We can dispense with the Oxygen Theory first. This one postulates that you yawn to get more oxygen to your brain. However, yawn frequency is independent of brain and blood levels of oxygen, as well as oxygen saturation levels in the air. Furthermore, fetuses yawn independently of their mother although they share the same oxygen levels. Thus, there is little support for this theory.
The Attention Theory is intuitive: I yawn because I need to be alert. There is decent support for this theory. Yawning increases when stimulation is generally lacking, and a yawn is usually followed by increased movement and activity, suggesting that some kind of physiological "waking up" has occurred.
It's tempting to link the Attention Theory of yawning to boredom, such as being in a long meeting. However, this theory posits that it's not the boredom per se that's making you yawn, it's your brain realizing that something important might be happening and trying to bring you back to a more attentive, preparatory state. Indeed, yawning increases immediately before high-stress activities: Olympic athletes yawn before their events, musicians yawn before heading on-stage, and soldiers yawn right before jumping out of airplanes.
Conversely, there's inconsistent evidence that increased drowsiness and sleep pressure increases yawning, nor that frequency of yawning is linked to prior amount of sleep or wake times. In other words, you don't yawn because you are sleepy or tired, you happen to yawn when you are sleepy or tired.
The Temperature Theory of yawning could explain this correlation.
The Temperature Theory says that yawning is a brain cooling function. As you yawn, your heart rate and blood flow increase, you inhale a large amount of air, and the air acts as heat exchange medium for the blood, subsequently cooling the brain. If this is actually the case, you'd expect yawning to happen with different frequencies at different ambient temperatures, and to be able to detect temperature differences in the brain with proper equipment.
Research on both rats and humans shows that yawning is immediately preceded by a rise in brain temperature, and immediately followed by a decrease in brain temperature after the yawn, supporting the Temperature Theory. Furthermore, people who hold a cold pack to their foreheads are less likely to yawn, medicines that increase body temperature increase yawning, medicines that decrease body temperature decrease yawning, and animals with bigger brains have longer yawns (because they take longer to cool).
Yawning is most frequent only in a narrow ambient temperature zone, when the air is neither too cold nor too hot. If the air is too cold, the brain is less likely to heat up, and if the air is too hot, then a yawn would supply hot air to the body and won't cause cooling. Similarly, yawning is observed less frequently in pedestrians on the streets in the winter than in the summer.
Perhaps most fascinating is the exception to the rule: fever. Yawning decreases when your body temp increases from fever. Why? Because the point of fever is to increase your body temp to fight off the infection: yawning would be counter productive!
What does the Temperature Theory have to do with yawning while sleepy? Body temperature has a circadian rhythm, and your body temp is at its highest in the evening...and therefore the time you are most likely to yawn. "But why do I yawn in the morning?" you might ask. It could be a combination of both Attention Theory (your brain is trying to prepare itself for the day) and Temperature Theory (your body cools off over night but starts to heat up in the morning).
Sociological Yawning
We all know yawns are contagious right? But why?
While physiological yawning is evolutionarily old and conserved, social (contagious) yawning is a relatively recent adaptation on the Tree of Life. Brain studies reveal that physiological yawning happens involuntarily in the evolutionarily older areas of the hind-brain, but social yawning initiates from the more recently evolved fore-brain. Some researchers believe that social yawning is a way of demonstrating empathy within groups.
There's support for the Empathy Theory of yawning. Contagious yawning in humans starts at 4-5 years old, only once children begin to develop the ability to identify another person's emotions. Contagious yawning is more likely from people you are emotionally close to, versus strangers, which is also backed up by studies in chimps, monkeys, and even dogs (your dog is more likely to catch your yawn than a stranger's). People who scored higher on tests of self-recognition, theory of mind, and empathy were more susceptible to contagious yawns.
Other studies have found individuals with empathy problems (e.g., autistic or psychopathic traits) are less susceptible to contagious yawning. However, it was subsequently shown that the contagious yawn deficiency in autistic subjects is likely due to their tendency to avoid looking at faces and therefore miss yawning signals in others.
Why would signaling empathy by yawning be important? Before apes evolved language, perhaps contagious yawning was a way to communicate and bond within groups. It could be that contagious yawning evolved to coordinate attention and preparation for activity, improving group vigilance for threats.
Then again, yawns may not be contagious at all.
There are plenty of studies that refute the Empathy Theory, and even the Mythbusters failed to demonstrate contagious yawning. But, studying contagious yawning in humans is difficult, as it is subject to environmental factors (e.g. temperature) and it's been shown that self-consciousness (such as from being aware you are part of an experiment) decreases the susceptibility to contagious yawns.
Still, natural observation of mammals demonstrates that contagious yawning is very likely.
Conclusion
So what can we say about yawning? Clearly, it's not just one thing.
Robert Provine, a University of Maryland psychology professor and yawning researcher, describes yawning as "a response to and facilitator of change in behavioral or physiological state."
Provine also links yawning with sneezing and orgasms.
To which I can only respond: yawning is weird.