I've been dehydrated once in my life. It was a really stressful time at my job and that day I left for work without having breakfast. I drank coffee throughout the day, barely had any water or food.
By the time I reached home from work, I felt like fainting. I was so nauseated and couldn't even walk properly. I also had this horrible migraine that would hit in cycles. My husband was home and he had no idea how to help me. I ended up in the hospital and the doctor said that I was dehydrated. He asked me about what I had eaten and drank that day and said, "no wonder!"
I didn't know this but apparently coffee is a diuretic, along with everything else that has caffeine. So it causes extra water to leave the body through urination. If you don't drink much water, which was what I did, it can cause dehydration.
So I guess the best treatment is prevention by avoiding diuretics (some medicines are diuretics too) and drinking more water if you have things like tea and coffee to make up for the water loss.