The last line of what Greenlydia said was my thoughts exactly. After a very bad anxiety episode once I am calm my stomach usually goes on me. That is probably the case. Xanax is relaxing you so it only makes sense.
Do you experience the diarrhea only when you've taken the Xanax, or this is a more frequent issue? One of the side effects of Xanax CAN be diarrhea, but it's not very common..........which doesn't mean it's not what is causing yours. We all react differently to meds.
I'd say if you only have the diarrhea when you take the Xanax, I wouldn't worry about it unless it is so bad you run the risk of dehydrating yourself. How long does it usually last?
I'd also talk to my doctor if this happens EVERY time you take Xanax. It might be best to try a different med.
Keep your eye on it and if the frequency increases, see your doctor immediately.
Peace
Greenlydia
P.S.
Bear in mind that anxiety can cause diarrhea in some folks, too. So Xanax may not be the culprit here.