Speaking as someone who went through this, running experiments with your diet is absolutely worth trying. It worked for me. There is actually a specific medical practice for this: look up "FODMAP". The idea is to temporarily cut out all likely suspects for a short period, see if that fixes things, and then gradually reintroduce them to identify the culprit. A gastroenterologist recommended this to me. It didn't help with my issues at the time as gluten is not covered by this cluster, but struck me as a very sensible approach.
In my experience the medical system is unusually useless and dismissive with digestive issues. I think this is probably related to how little it can do in this area. 10-15% of the US has IBS, and this is a disease of exclusion. That literally means that the medical system acknowledges a cluster of symptoms, but has no idea what is causing them or how to cure them. I can imagine that blaming patients is easier than the alternatives for some doctors.
Sorry, I didn't want to turn my original post into an essay, but I've already done low FODMAP and various other restricted diets for diagnostic purposes, without any noticeable shift in symptoms. Only bread and sugar seem to be correlated, and not strongly. To me it's a curious symptom rather than the root of the issue.
Have you looked into Mutaflor probiotics? It’s a beneficial E. Coli (seriously) that has research showing it can colonize the gut and clinically improve e.g. IBS symptoms. I’ve personally seen it solve (or significantly mitigate) issues for multiple people.
I wish the medical world would not consider a "syndrome" as a diagnosis. No, it's a symptom! Maybe that's all the information you have, but it's not an answer.
As for FODMAP--I've gone that route and gotten a few surprises. The origin of something can matter. The storage can matter.
In my experience the medical system is unusually useless and dismissive with digestive issues. I think this is probably related to how little it can do in this area. 10-15% of the US has IBS, and this is a disease of exclusion. That literally means that the medical system acknowledges a cluster of symptoms, but has no idea what is causing them or how to cure them. I can imagine that blaming patients is easier than the alternatives for some doctors.