Another theory is that during deep sleep cells go into more of a maintenance mode, with slightly increased mitosis rates, waste removal and decreased central (nervous-system control) acting slightly more like single-celled organisms.
This state change seems to be partially thermally regulated but also via chemical and neuron mechanisms.
Yawning and stretching (pandiculation) seems to be correlated with increasing alertness and temperature so maybe it helps sync your cells back to optimal central-nervous system control and suppresses the unicellular maintenance functions. For example it's disadvantageous to have a bunch of your muscle cells in the middle of mitosis if you soon need to run from a predator or hunt.
Is there any possibility that it has to do at least in part with physical/mechanical fluid flows, in addition to cell-level activity? I remember reading about how we are discovering complicated fluid systems within the brain, and we already know about things like the lymphatic system.
I also wonder about yawning as a kind of "stretching" for the head/neck muscles, respiratory system, mouth, and brain. And general about the purpose of stretching as a way to somehow reset, awaken, or moderate nerve connections between the brain and various parts of the body.
This state change seems to be partially thermally regulated but also via chemical and neuron mechanisms.
Yawning and stretching (pandiculation) seems to be correlated with increasing alertness and temperature so maybe it helps sync your cells back to optimal central-nervous system control and suppresses the unicellular maintenance functions. For example it's disadvantageous to have a bunch of your muscle cells in the middle of mitosis if you soon need to run from a predator or hunt.