Just a brief one.
I had tried some breathing exercises with the aim of increasing my level of carbon dioxide to see if it caused sedation or relaxation as I had read. I noticed that each time within a minute of starting the exercise I had the uncontrollable urge to yawn.
I was performing these exercises as I lay in bed. Interestingly, the urge to yawn only came when my eyes were open.
This led me to wonder whether yawning is a mechanism by which the body avoids respiratory depression and associated increase in carbon dioxide levels (state during sleep) when it is contradicted, ie our open eyes signalling that it is not time to sleep. The yawn draws air deep into our lungs to rebalance the oxygen/CO2 for wakefulness.