There are the two often quoted types of IBS, i.e., IBS-D and IBS-C. We need not go into details
. However, it does look as if there is more than one cause for what is called IBS.
In trials, they trained sniffer dogs. This was done in the way that they do for some types of cancer. Interestingly, the people picked out as positive for IBS by the dogs, where the people who responded best to a low FODMAP Diet. This seems to have led them to think that there is more than cause.
I have suffered quite badly from anxiety in the past although it seems under control at the moment. I have never been told that anxiety is a cause of IBS. It certainly seems to be a contributory factor though.
If you find you are getting a hangover type state after an IBS flare up, it is well worth looking into fodmaps. Food high in fodmaps is high in fermentable sugars. This does not mean you cannot eat any sugar, indeed, some sugar substitutes are high FODMAP. If you cannot digest these fermentable sugars, they ferment in your gut and ultimately lead to the cramps, pain and constipation or diarrhea individual guts use to try and get rid of the problem.
This fermentation leads to brain fog, hangover sensations and dehydration. Whatever the cause of your IBS water will not do you any harm. I would certainly recommend rehydrating yourself as a first port of call.
Unless your doctor is a specialist in this area I really would request seeing a dietitian. Not all of them have caught up with the Australian research but many of them have.