It would be nice if there was a simple translation to the following but I don't have one. My area of expertise is infectious disease and not the cellular level of ID either. However, I do understand in many of our physiological processes, there are typically chemical cascades that add or block catalysts, trigger absorption or release of neurotransmitters, add or block enzymes, open or block receptors and so on. In the case of nitroglycerin and related drugs, they are precursors which are turned into the active nitric oxide as part of the cascade.
While it's easy to think a headache is merely caused by dilated blood vessels or increased heart rate or other simple process, there are all sorts of other things going on such as histamine and prostaglandin release and other inflammatory processes which can actually be the mediator which triggers the perception of pain. And in many cases, there are other factors in the brain which can override or accentuate a pain impulse.
So with that in mind I tried to find articles related to the etiology of nitroglycerin headaches. But to really get to the specifics I'd need a lot more time. So here's a starting place:
Nitroglycerin-induced headaches
nitrolgycerin (NTG), which has been shown to induce migraine attacks in up to 80% of migraineurs.
Basically what it says is whatever causes migraines is triggered by nitroglycerin. And some people who had no history of migraine but still got a migraine like headache from NTG had risk factors for migraine.
It seems to be accepted that NTG triggers a migraine. If that is the case then it is curious if it is merely blood vessel dilation, why everyone doesn't get the same headache. But they don't.
Looking at a variety of additional information:
Sumatriptan causes parallel decrease in plasma calcitonin gene-related peptide (CGRP) concentration and migraine headache during nitroglycerin induced migraine attack.
All migraine subjects developed headache after GTN (NO precursor)
Investigations into the role of nitric oxide and the large intracranial arteries in migraine headache.
And if that isn't enough to show there isn't a simple explanation, here's an odd paper on another action of NO in scar formation:
nitric oxide (NO) plays an important role in the inflammation stage of wound healing.
If I had the time to get to the bottom of the issue (if research has even determined what the etiology of nitroglycerin headaches is) I'd have to see what serotonin neurotransmitter did in this case, what CGRP did, and what NO did to the cell's energy cascade (cGMP is what the cell does with those calories to make energy for use).
Terms for further investigation in order to determine the effect the nitric oxide cascade might have that mediates a headache:
platelet serotonin concentration
higher plasma CGRP
NO-cGMP pathway
If you want to take it from here then?