I have migraine and a protein degraded substance called tyramin is the culprit for me. It's actually quite comman as a migraine trigger, I wonder why it's not talked about more.
Have you ever noticed a connection with cheese or salami or red wine? It was quite hard for me to connect because the migraine only gets triggered after I already had brainfog for a week or so, but tyramine also is responsible for the brainfog. And it's in every damn food but in varying amounts. Like I'd eat some cheese, get brainfog, eat canned beans, leftovers, some processed shit and then a week later I get a migraine from cheese.
Anyways these headaches I had were lack of sleep and autumn weather.