According to Robert R. Provine, professor of psychology at the University of Maryland, Baltimore County, and author of Laughter: A Scientific Investigation...

Virtually any stimulus associated with yawns -- including viewing, reading about, and even thinking about, yawning -- evokes yawns. (Are you yawning yet?) Yawning spreads in a chain reaction through a group, a compelling example of human herd behavior and a reminder that we are not always in conscious control of our actions. The urge to replicate an observed yawn is clearly an automatic response triggered by our brains.

Studies partially explain the reason for yawning. Although we yawn more when sleepy or bored, it is unclear whether yawning increases alertness. And scientific evidence refutes one of the most popular myths of yawning? that it happens in response to low oxygen or high carbon dioxide levels in the blood or brain. Test subjects do not yawn more when breathing air with enhanced levels of carbon dioxide nor do they yawn less when breathing pure oxygen. One fact explains a lot of apparently inconsistent data. People yawn most during behavioral transitions, such as just after waking and shortly before bedtime. Yawning may help facilitate those changes. Contagious yawning may synchronize a group's behavior so that, for instance, a whole family goes to sleep together.