Is constant yawning a lack of oxygen to the brain?

Yawning is an instinctive response caused by a variety of factors. It is believed that if you do not get enough sleep or are in a poorly ventilated environment, you will experience impaired gas exchange in the brain, leading to an increase in carbon dioxide concentration and a lack of oxygen in the brain, resulting in a regulatory mechanism that produces the specific breathing movement of yawning.