I occasionally clean out with salt water flushes during a fast. Good bacteria don't like the salt.
To replenish, I have an apple, berries, mango day, with green veggie juice.
Then I take a probiotic in the evening (something that guarantees to survive stomach acid). Usually by the next morning, my pooper is working great again.
Not sure about the twitching you feel in your muscles. My muscles did that when my saliva PH was very low, and my magnesium was low as well.