I always feel lucky that I never have to deal with those for some reason, but know a lot of guys who do get them from time to time putting them out of commission for bottoming out.
I'm no medical expert, but one piece of advice I hear a lot is to keep your diet healthy and high in fiber. That's all I can say for that, so hopefully someone else will have more advice for you.
Feel better