Why is your headache relieved for about five to ten seconds when you do a big yawn?

lack of oxygen to the brain makes you yawn. so when you have a headache and you yawn it increases the oxygen flow temporarily relieving your haedache