I know someone who semi-specializes in treating GI conditions that present like this (unknown cause, vague diagnosis). It's a very difficult area to work in because non-specific GI symptoms can be the result of a wide range of things, from physical obstructions to nervous system problems and even stress.
This blog post is great because the author keeps an open mind. One of the challenges with functional conditions that can possibly overlap with mental health is that some people (not this author, speaking generically) become extremely defensive at any suggestion that the condition might be related to stress, anxiety, or depression. My friend has a whole strategy of asking questions about the person's life, job, relationships, and life changes around the time the condition started. With surprising frequency, patients will remember the start date of their GI conditions specifically because it happened near something stressful (death in the family, layoffs, new job, etc.). I don't think this applies to the blog author, but keep in mind for anyone else reading this with similar symptoms.
Stress-triggered conditions have a bad property of becoming self-reinforcing. The initial stressor might be gone, but the person is stressed about the constant problems with their conditions. Understandably so!
She says it's common to have people spontaneously get better when they get a new job, go on a long vacation, enter a new relationship, or other large life changes. It's also common for patients to start SSRIs with another provider and "coincidentally" the GI symptoms get better. It's also common for other providers to blindly prescribe medications that worsen GI symptoms if they aren't paying attention.
The hard part for her broaching the subject with patients who don't want to hear it. There's a huge resistance to any path of inquiry that patients think as "all in your head" diagnoses. It's understandable, but at the same time most people don't understand that your nervous system operates throughout the body (not just the "head" or brain) and the activity of the GI system is heavily modulated by the nervous system.