There is a condition called “food-associated exercise-induced anaphylaxis,” abbreviated FAEIA. People with this condition can exercise without a problem and can eat a particular food without an allergic reaction, but when they exercise around the time of eating the food then they may have an allergic reaction that can be severe (anaphylaxis). Some of the foods most often implicated in this problem are wheat, celery and shellfish, but many other foods can be a trigger. Sometimes, any meals eaten before exercise can be a problem.
The problem is variable in that the severity may differ from time to time, or there can be times when no reaction occurs. The treatment is to avoid the trigger food for several hours prior to exercising, wear medical identification jewelry, always have emergency medications available (self-injectable epinephrine), and to exercise with a buddy who knows about the problem.
If you suspect FAEIA, you should talk to your doctor about having an emergency plan and seeing a board-certified allergist for diagnosis and treatment.
Exercise is also a trigger for asthma, but this is different from FAEIA because food is not involved and there are no symptoms other than the asthma.
Exercise can also “exacerbate” an allergy to any food that already triggers symptoms. For example, if a person has a known walnut allergy and accidentally ate walnut, then also exercising at the time of the ingestion might exacerbate the symptoms even more. Similarly, other exacerbating factors could be having a virus, menstruation, drinking alcoholic beverages, or using aspirin-related medications (non-steroidal anti-inflammatory drugs, NSAIDS).