The only solution I've had for the headaches is to prevent them by taking ashwagandha before sleeping at night. The minimum amount I need to take is 2 Himalayan organic ashwagandha tablets. If I exercised that day, I need to take up to 7 tablets both to sleep okay and also to not have a horrible headache the next day. Since the herb reduces cortisol, it makes me think the headaches are caused by too high cortisol levels so that your body is under stress during the night and you aren't actually resting.