When I was 40 I started getting migraines and my main pre-migraine mood would often be 'jittery' " worried " without reason, often the day before. Then I would wake up with the migraine, I eventually learned to recognise the signs and take advil and it would prevent or soften the morning migraine.
Because if ignored the migraine just created more anxiety as I tried to force myself to work. Then the post migraine was a fussy head. Now that my migraines have almost disappeared as I am being treated for depression. (and without work stress)
Don't know that this helps but it seems migraines are their own beast.