My IBS was similar to yours in some ways. My anxiety, stress, and insomnia made my IBS much worse. I dedicated myself to stress management(I practiced Progressive muscle relaxation every night immediately before sleep), behavioral insomnia management, meditation, and mindfulness. My IBS eventually stopped(knock on wood!).
My current diet has been life-changing. Time-restricted fasting. I finish my three meals and snacks by 4 o'clock every day. I go to sleep at 10, I eat my breakfast at 6 o'clock . Every day 12-14 hours of strict fasting(No food of any kind 6 hours before sleep). Dr S. Panda, from the Salk Institute created this and is doing research on this. He is one of the leaders in the world in circadian rhythm research. He initially designed this protocol to improve circadian rhythm and improve sleep. However, many participants in the study reported that their chronic stomach issues improved or went away altogether. You are giving your entire digestive system 14 hours of bowel rest every single day. My life-long gastric reflux completely stopped(in 2 weeks and it is still hard to believe if it didn't actually happen to me).
To be totally transparent: I also took sugar out of my diet years ago. I also don't consume omega 6 fatty acids-like corn, soybean, and sunflower oil. I use olive, canola, and avocado oil--and Krill oil supplements. My carbs are mostly from quinoa, barely, oats, and beans. I don't eat a lot of meat or processed carbs.
Because of my AS traits, I am repetitive with my eating so once I figured out the what, how, and when of this diet, I just just put it in repeat cycle. In addition, I do a 18 hour fast once/week. I am healthier and more fit now than when I was 20(of course I did have uncontrolled stress, and bad insomnia, and IBS at that time). Dr Rhonda Patrick interviews Dr Panda about this diet and research on her site, Found My Fitness. She is one of my favorites. She has phenomenal information and interviews on her website and on YouTube.
Another point. She looks at a lot of lifestyle changes that can improve brain function. I think they can be particularly helpful for our community. Her PhD is in bio-medical science and she works as a researcher for her full-time job. She is smart as heck. and cool
SteveH