Drinking lots of water is alwasy the first line of defense when going though any "healing crisis" on the MC. While what you went though could have been dehydration you also have to take into account that the MC is also considered a kidney cleanse so you could have just loosened some debris or kidney stones and that will put you in a world of hurt. In any case good move with the water glad it did the trick for you.
I have suffered from serious bouts of kidney stones and I'm quite familiar with the pain. I've not had any more stones for the last 6 years since I've been doing the MC pretty regular but in case the water doesn't do the trick I have found that strong infusion of ginger tea in hot water has given me instant pain relief. The other way to help draw out toxins from the kidneys and relieve pain is grating ginger and boiling it in a big pot and let it cool to where you can stand to touch it and soak a towel in the mix and wring out the excess liquid and fold it and lay on your stomach and put the hot towel over the kidney area and cover it with a piece of plastic and another dry towel to help retain the heat.