There can be so many reasons for headaches and migranes from low blood sugar, anemia, cold etc but the physiological action that happens is tensing of neck/back of the head/shoulder muscles. So without actually being able diagnose it, for pain relief you should look to relieve that muscle tension. Try hot epsom salt baths, painkillers (as you are doing), making sure you cover up your neck and avoiding a pure carb diet but still making sure you are eating regularly.