Migraines and thinking

Table of contents

A migraine disorder runs in my family - it's an interesting, albeit annoying, long term condition. I've had migraines for about 14 years now - and I've been able to manage them with OTC medication and abortives. I've had repeated scans of my brain (for another condition - which I was treated for ~2013) and nothing is structurally wrong or off about my brain (at least presently).

In this post, I'll be discussing my experience with "pure" migraines (headaches whose source is not some underlying tumor or issue) as well as how the disorder changes my mental affect.


The quality and characteristic of my migraines has changed in noticeable ways over the years, as have my triggers - but there are constant triggers which I've noticed and recorded.

Triggers and ambient stress

I've found the relationship between my migraines and stress to be quite complicated.

I've noticed that there is a significant relationship between ambient stress and the threshold sensitivity of triggers. I'm not sure how often longitudinal studies focus on this aspect of the headache disorder - perhaps this idea arises in the connections between migraines, anxiety, and depression which likely include some study about ambient stress levels of individuals.

In my thinking, ambient stress is a constantly fluctuating background level of stress. It's useful to have some stress (so e.g. you get out of bed in the morning) but bad if that stress is so constant and parallelizing that you find that you can't do anything (e.g. you can't get out of bed in the morning because you're overwhelmed). Every individual has a unique relationship with their stress levels - and understanding how to manage them for yourself is a useful skill.

Ambient stress presents an interesting conundrum for me as a migraineur. On the one hand, if I'm in the middle of deep work, I am stressed - but not in the way which someone might talk about stress in a casual setting. This is "good" stress - in the sense that, at least for me, there's some enjoyment in it. But there's a very real cost/benefit calculus involved because I have a migraine disorder.

I have certainly been working in aggressive spurts, happy about progress on a problem, and realized that I've pushed myself over the migraine threshold - and I'm about to get a headache. For my typical cadence of work, this happens often. It definitely happens more often when I have to juggle multiple things simultaneously (say, multiple classes, and research projects).

I like to think that there are positives and negatives to this internal migraine threshold. On the one hand, it's started to force me to focus on fewer problems. There's a few things which play into this. If I try and juggle multiple things, and do deep work on all of them, I get stressed. I like doing good work, and if I have too much work, even if it's "busy" work (e.g. series of small, non-creative tasks which must be done) - I won't do good work. That stresses me out. When I'm stressed out, I become hyper-sensitive to stimuli. When I'm hyper-sensitive to stimuli, any of the above triggers might push me over the edge. The longer the time I spend working in the above state, the higher probability that I'll start a migraine episode. This cycle is probably the most basic process which I have to consider when handling my migraine disorder.

It's an interesting and sometimes annoying calculus - but I think it's actually been helpful to me in certain ways.

I suspect, but obviously can't prove, that the mental ruts that many people find themselves in after staying at the brink for too long might partially be alleviated by an internal "hey, you fucked yourself up" alarm like a chain of migraine headaches. At least for my migraine disorder - I have a clear and painful message "you're pushing yourself too far, and these are the consequences".

I'm not saying that migraines are good or that I wouldn't take a hypothetical cure - only that it's been a useful coal mine canary for other, potentially more serious problems I could cause for myself if I stretched myself thin for months on end.


I suspect I've had over a thousand migraines so far (in the 14 years I've had a migraine disorder). There are common patterns, and also slowly changing patterns which I've noticed as I've been getting older.


From approximately 16 years of age to 27, the only symptom of my headaches was sharp pain, located behind either temple. This pain (during the main headache phase) always lasted between 4 - 16 hours - and I could treat the pain with over the counter medication like Advil. I would often take 2 Advil, and a single extra strength tylenol - and this would reduce the pain to an easily manageable level.


From about 27 to the present (I'm currently 30), my symptoms evolved to include two new elements. The first is dizziness and vertigo, dominant in the prodrome phase (which I previously never consciously experienced or noticed). This has compounded with changing vision - I've had to modify my prescription over the past 4 years (slowly) as my eyes have continued to change. This has probably been the most annoying symptom to me in recent memory. Interestingly, if I partake in exercise during the prodrome phase - I can eliminate the dizziness. Additionally, usage of migraine abortive medication like sumatriptan will eliminate the dizziness.

Verbal aphasia

The second new symptom is probably the most interesting one. In the prodrome and main headache phases, I suffer from mild to moderate loss of words.

It's quite interesting - it's seems to be only verbal. For example, if you asked me to write a technical document or respond technically to a question - even during a migraine attack, my text-based natural language abilities seem to be mostly unaffected. Part of this is the speed of verbal processing - which takes a huge hit for me during a migraine episode. My overwhelming sense in conversations, especially technical ones, is that I need more time to respond. In a textual conversation, this time is easily allowed for - so perhaps my sense that I don't suffer in text-based conversation is partially attributed to the fact that I can take more time when I need it.

This element of verbal aphasia is particularly noticeable if I'm responding to technical questions in presentations. Presentations are often stressful - and preparation for a presentation is an ambient stress level raiser. That often me (again, for me) that presentations can be a source of migraines. I manage my migraines like I normally do - but that doesn't fully eliminate the element of verbal aphasia. Previously, I've been quite embarrassed by this aspect of my headache disorder - but I've recently come to terms with the fact that this is just an element of my operating condition which I'll have to figure out a way to work with.

If I take an abortive medication like sumatriptan, it does help with the verbal aphasia - but if you find me at a loss for words in responding to a technical question, it's often beneficial to engage in a textual conversation after the fact.

Mental affects and thinking

Unsurprisingly, the most disruptive aspect of my migraine headaches in programming work is the dizziness and pain elements. As I've mentioned above, the verbal aphasia seems to avoid diminishing textual manipulation, as compared to my ability to engage verbally. But the dizziness unavoidably affects focused work on screens - and pain unavoidably affects any activity.

Because migraines present with such a wide variety of symptoms, I do find myself to be in a different perceptual headspace when I have a headache. In the past, I've used this headspace in various ways. I don't want to call the sort of thinking I do in this space "out of the box" thinking - but it certainly is more unstructured than my baseline level. I find myself thinking about weird aspects of things. More specifically, I find myself attempting combinatory reasoning with combinations that seem bizarre to me when "sober" (no headache). For example, a recent thought path towards understanding what dependent types have to do with metaprogramming came from a migraine episode.

I'm not saying these thoughts are fundamentally new or useful! But I just tend to try things that are off the beaten path from my "sober" thinking. I like to keep track of the hunches I get during these periods and attempt to re-visit them after the headache phase. I like to think of the mental affect which I have during these periods as a form of chaotic "mindstorm" thinking, but instead of having to create it artificially - it's a by-product of a biological process. Emotionally, there's normally no change from my normal affect - although I'm normally stressed about the pain (before I've treated it appropriately).

In addition to the above mental affect, I've found that extended periods of pain experiended during a long migraine attack provide a sort of euphoric effect similar to being tattooed. Having to cope with pain in scenarios where I don't have access to NSAIDs or abortive medications like sumatriptan has also encouraged me to adopt certain meditation-like processes. One convenient technique is breath control - which I typically use to force myself to fall asleep.

The day after

The day after a headache period is interesting - I have a sort of dull affect which can't be remediated with caffeine. In general, I can have significantly more caffeine the day after a migraine headache, without experiencing the normal side effects of having too much for my normal consumption. This feels like a sort of refractory period from the seemingly chaotic, almost psychedelic, affect during the headache phase. During the headache phase, my thinking feels active but altered: I would describe the day-after affect as passive.

My thinking is dulled - perhaps slightly below my baseline level. I can still participate in technical conversations, but my capability to do deep work is diminished - and my motivation also takes a hit. I don't feel sad, or emotionally drained - but the normal mechanisms which I use to get myself excited about thinking have a diminished effect.