There are a lot of theories, but I don’t think there’s a definitive answer.
* Body’s attempt to increase awareness/wake up: It is thought that yawning forces the blood vessels to expand, increase blood flow, stretch muscles, and increase oxygen levels all of which may aid in waking you up or increasing alertness. From what I read this doesn’t have much supporting evidence of expanding blood vessels or increasing oxygen levels.
* Temperature control: When the brain is tired, it slows down and needs to work harder to think. This increases temperature. It is theorized that yawning draws in a lot of cool air over the roof of the mouth, cooling blood on it’s way up to the brain and help cool it down. There is evidence supporting this in that people tend to yawn more when it’s warmer outside.
* Social ques: Yawning can give others a heads up that you’re not fully awake, you’re getting tired, and need rest. This is encouraged by the fact that it seems contagious and will cause other people to yawn.
Latest Answers