Well, we do have a layer of muscles over the entire area. Your head hurting when you cough is actually pretty common with a cough. Here is an article about it: https://www.healthline.com/health/head-hurts-when-i-cough If it is a primary headache, the cough is causing it. It happening to one side is typical. A secondary headache means that it is happening because of another underlying condition (like aneurism). Most likely, this is an issue caused just by the cough and pressure on the chest and abdomen. If the head pain becomes intense, call your doctor. If you are overly worried, call your doctor. Always better safe than sorry but likely this is just part of having a nasty cough and will go away when the cough does. Hope you are better soon.