Yawning can be triggered by the hormone oxytocin which is released in the brain during empathetic actions like touching, kissing or cooperating, and which triggers a release of dopamine, a feel-good neurochemical.
WSJ: Matt Ridley on Why You Just Yawned | Mind & Matter