There is a common genetic disorder that causes iron overload.
Excess iron loads into organs, tissues, and onto joints, and it is classified as a gastrointestinal disorder because iron is absorbed into intestines. Many with intestinal or digestion issues are diagnosed with IBS, colitis, GERD. Many with joint and muscle pain that comes and goes and unexplained and chronic fatigue, memory and brain fog, are diagnosed with fibromyalgia. Headaches and migraines are common and frequent...iron loads onto brain, affects us neurologically.
It causes abdominal pain, swelling, sweats, nausea, vomiting, fluid retention and pain under ribs. It causes heart palpitations, arrythmias, cardio myopathy, and leads to congestive heart failure.
It damages liver and causes cirrhosis.
It damages pancreas and causes diabetes. It loads onto pituitary gland and thyroid. There are so many disorders and diseases as a result of iron overload, it is wise to not overlook this as the drs do...
Excess iron even in small amount over what our bodies need is to be healthy and if we store it then over time it builds up in our system and causes so much damage.
Not saying this is your case...I just like to share it with people who are experiencing the type of symptoms as you describe, and then you can do what you like to get more info or testing to rule it our at least. The earlier one knows about it the better.
The tests for iron overload, hemochromatosis, are not routine. They need to run ferritin, transferrin saturation%, TIBC, and serum iron.
Take care and hope you find some answers soon...drs are way behind in diagnosing this early.
Variant abdominal migraine would be my clinical impression.