Reduce stress ,practice Aerobic exercises , develop a regular sleep pattern
You should avoid diet drinks,tobacco,caffeine,maintain hydration.. Musculoskeletal causes
might also lead to your headache and it could be referred pain
.Bad sitting postures may also cause headaches.You should consult a neurologist and also go for a x-ray or a MRI to rule out cervical degenerative changes.Was there any jerk or spine injury?
Neck exercises and yoga will help you.