Most headaches are caused by lack of oxygen to the brain. The two jugular veins which carry the oxygenated blood to the brain–attached to cervical spine (neck)–penetrate a big cavity at the base of the skull (foramen magnum) and then enter the brain.
These veins could be compressed by certain neck muscles, and compromise the oxygenation to the brain which will result in headaches.
These neck muscles respond to the position of the shoulders. When the shouders move forward, they take the neck and head forward with them, causing the eyes to be directed downwards, towards the floor. However, because of the "righting reflex," the head must be pulled back to level the eyes. For every inch the head is in front of the shoulders, the neck muscles are forced to work three times harder to support the head.
"The position of the shoulders is determined by the position of the hips because they carry the body's center of gravity."
The most common muscles which may cause headaches when they are in a spasm are:
The posterior Suboccioital muscles, located in the back of the head, connecting the skull to the 1st and 2nd vertebrae of the neck. When they are spastic they will refer pain to the back of the head, temples and behind the eyes. The anterior Suboccipital muscles, located in the front of the skull which connect the skull to the 1 st and 2nd vertebrae of the neck from the front. When they are spastic they will refer pain to the back of the head and the ears.
The Upper Trapezius and Levator Scapulae muscles connect the cervical vertebrae to the shoulder blades (scapulae) and upper thoracic spine. While in a spasm they will produce pain to the back of the neck, to the shoulder and headaches.
The S.C.M. (Sternocleidomastoid) muscle is connected from the Clavicle (collar bone) to the side of the neck under the ear. When in spasm it produces headaches, stiff neck, and pain to the jaws, and side of the neck.
The position of the shoulders is determined by the position of the hips because they carry the body's center of gravity. When the hips are pushed too far forward or backwards while sitting or standing, it will change the position of the shoulders which in turn affects the workload of the neck muscles and make them more suceptible to fatigue, leading to spasm.