Just to throw in another point of view - it could be from being over hydrated. Drink too much water, especially that without electrolytes and your stomach osmolality is off meaning electrolytes are drawn from the blood into the stomach to balance it out. Without the correct balance you cannot absorb the water (I am lead to believe).
For me, I get bad migraines post workout if I get the hydration wrong. They come mostly when I am fully hydrated (pissing clear all day) and then throw in a couple of litres whilst on the trainer (2hr ride). I now keep my urine a pale straw colour during the day and stick to one biddon per hour max on the bike. I also add electrolytes to the water now.
I actually do not actively drink water during the day now. With two or three cups of tea/coffee (oh, and coffee will dehydrate you too), fruit, veggies etc I get more than enough water. If I am thirsty, sure I will drink water but don’t drink regardless anymore. It’s something that is often taught and it’s wrong IMHO. Drink to thirst, not the clock. There is no volume of water you should be drinking because it depends on other sources (food) and what you body needs.
So this is just me, my experience and YMMV but something to consider if it continues.