Sending my empathy, validation, affirmation, and support to your child and you.

It seems very reasonable to me that a gifted person's stress and anxiety from boredom of endless school days without appropriate academic placement and pacing, and without intellectual peers, could accumulate to cause physical symptoms including pain. Unfortunately. The isolation and lack of mental stimulation from not learning something new could eventually make a person feel trapped, dis-empowered, and helpless.

A few links to articles online:
1) Recognizing and easing the physical symptoms of anxiety
August 1, 2020
Blog of Harvard Medical School

2) Stress symptoms: effects on your body and behavior
Mayo Clinic

3) Stress effects on the body
November 1, 2018
American Psychological Association (APA)

4) Chronic Stress, Cortisol Dysfunction, and Pain: A Psychoneuroendocrine Rationale for Stress Management in Pain Rehabilitation
by Kara E. Hannibal, Mark D. Bishop
2014, 2017
PubMed Central (PMC),
US National Library of Medicine (NLM),
National Institutes of Health (NIH),
National Center for Biotechnology Information (NBCI).