For some people, coughing can trigger a headache or worsen a pre-existing headache. This is thought to occur because coughing briefly increases pressure within the skull. Similar processes like straining to go to the bathroom or exercise can similarly contribute to head pain. Headache associated with coughing can occur on its own with no underlying cause, or it can be due to an underlying medical condition such as a structural malformation of the brain.