YOUR HEADACHE IS MOSTLY DUE TO INSOMNIA., MAINTAIN PROPER SLEEP HYGINE i.e. fix the getting up time from sleep, no coffe/tea/tobacco/smoking after 7.00pm. miniumum use of tv/comp/mobile phone after 8.00pm take bath at around 9.00pm in dinner consume curd-rice,milk,ice cream which will leads to natural sleep. if u r not getting sleep, do not lye in bed. if problem still persist , consult psychiatrist for detail evaluation.