This has to do with the arrangements of the various ligaments in this area.
When you yawn, you are opening your mouth, and causing the mouth to open. This causes the ligaments and muscles to shorten, which can cause discomfort. Try moist heat when u get up in morning. Keep smiling!