Meta: A recent post asking whether strenuous thinking can cause headaches prompted me to polish off and publish this long-incubating draft. These are some of my learnings from my multi-year ongoing headache/migraine/chronic pain journey. For every thing I suggest below, there are nine things that I tried and judged to be ineffective or marginally effective. Consider this my attempted distillation of many books, much medical instruction, and years of personal experimentation. I am not a doctor, this is not medical advice, just a list of things that work for me and things that I pay attention to.
Here are some simple, powerful things to try if you wish you had fewer headaches, or just suspect that you ought to generally feel better and have more energy than you do.
You should be sleeping on your back, with a single pillow which provides good stability and support for your neck. Sleeping on your side can be acceptable but I would avoid it. If you have trouble sleeping on your back, try putting a pillow under your knees for a while to keep your body in place while you sleep.
Why: If you sleep wrong, your nervous system does whatever it can to protect your spinal cord and brainstem. This may include ramping up the tension in your neck muscles to the point of exhaustion, restricting blood flow, causing inflammation of local tissues, and irritating the cranial nerves. If this tension becomes chronic, the muscles will form knots, or trigger points, which perpetuate the pain on their own. Sleeping on your stomach does all of that and also actively puts tension on the deep muscles and tendons which leads them to change shape and ruin your neck curvature. Then your problem becomes chronic.
You should be sleeping enough. My litmus test is that if I'm sleeping enough then I will not nod off while meditating, and I will be able to readily get out of bed in the morning. Consider that you may be so chronically mildly sleep deprived that it feels normal to you, and experiment with going to bed an hour earlier.
Why: Not sleeping enough increases all-cause mortality and reduces mental and physical functioning. Chronic mild sleep deprivation shaves several years off your life. It also directly leads to poor modulation of blood sugar and lazy posture and thus neck pain. Studies show that humans are very poor at knowing if we're sleeping enough.
Reduce or eliminate your intake of high-glycemic carbohydrates such as bread and rice. You can get fancy, but first just try entirely cutting out bread and rice for a day, while making sure that you're replacing those calories with something else non-carby so you aren't hungry and crabby.
Why: Unless you are eating an ancestral diet, or the diet of an ancient culture known for having a disproportionate fraction of centenarians, you can assume your diet is garbage. Your prior should be that your diet is garbage, the burden of proof is actually on you to prove that it isn't. One probable way in which your diet is garbage is an overconsumption of grains and other simple carbohydrates relative to what your body's metabolic systems are designed for. If you feel like crap in the afternoon, that's strong evidence that your insulin system needs work, and you need to cut out the carby lunches. Luckily you don't have to buy this explanation. Empiricism! Just try cutting out these foods for a day or two and see if it works.
Note that I am not talking about weight loss, I am talking about blood sugar regulation, and how you feel. It's very easy to test whether certain foods make you feel better or worse.
If low-carb lunches help you and you want to take the process of blood sugar regulation further, buy a bag of almonds to snack on throughout the day.
Why: You're probably letting your blood sugar get too low. Yes, intermittent fasting is supposed to be good for you, but probably not if your metabolism isn't up for it. One indication here is that if you never feel hungry, except sometimes when you get extremely hangry, then you'll know that your body sucks at telling you when to eat, so just try eating almonds every 3 hours.
Watch this video on what correct posture looks like. I know, I know, ignore the clickbait title, it's the most concise and correct video I've found, and I've watched dozens, read books on the topic of posture, and been treated by numerous physical therapists. Follow the advice in that video. Work on scapular positioning, chest flexibility and pelvic tilt. Posture is a high-dimensional object, be prepared to not see results for a while.
Why: If you work at a computer, it's probably pretty simple. You're letting your arms hang from your trapezius muscle, and you're letting your head hang forward. Your trapezius muscle is not strong enough to hold up your arms all day, this is what your rhomboids are for. The various other muscles in your neck are not strong enough to support your head, that's what your cervical spine is for. Sitting all day is overtaxing small, weak muscles, leading to inflammation, blood flow restriction, and referred pain. Sitting with good posture for prolonged periods should feel effortless. If it doesn't, you need to follow the videos until it does.
Also, you shouldn't be sitting for prolonged periods. Try to get up and walk around every twenty minutes or so.
Since, if you have a desk job, you may not have much choice re: sitting for prolonged periods, then at least make sure you're sitting correctly. First note that it is nearly impossible to find good advice on this. I was going to provide a list of images of "good sitting posture" and then point out how they were wrong, but every image I found was wrong so I gave up on that. So just try to follow these instructions: You should be sitting on your sitz bones. Your chest should be open. Your shoulders should hang back with your shoulder blades coming slightly together, held there by gravity due to the angle of your thorax, not pulled by muscular effort. Your chin should be held in, your head held up as if suspended from the top of your skull by a string. Your seat should be at whatever height allows this to all feel right. Your monitors should be at whatever height allows you to look at them naturally without raising or lowering your head to follow your gaze. Your keyboard will need to very nearly be in your lap.
If your keyboard is up on the desk in front of you, good luck keeping your shoulders properly hanging back, good luck keeping your chest open, and good luck keeping your chin tucked -- and by that I mean, you can't.
Why: Humans aren't supposed to sit still. Our bodies are simply not designed to hold rigid postures for prolonged periods, every day. Holding still requires that certain muscles be kept "on" continuously, which fatigues those muscles tremendously and leads to inflammation, trigger points and strength imbalances, which become chronic.
The only supplements worth a damn, in my opinion, are Vitamin D, which empirically reduces the frequency and duration of respiratory infections, and Fish Oil or Krill Oil, which provides valuable fatty acids and reduces inflammation. I have tried probably thirty other supplements for various duration and none of them do much of anything.
Very small doses of Lithium and Magnesium may help, but if they do, the effect size is small.
My Friend tells me that CBD oil has strongly positive effects on headaches and general wellbeing, but I would certainly never recommend that you take a substance of questionable legal status.