Why does my water smell like rotting materials?

This is caused by a couple of things:

Sulfate reducing bacteria in the hot water heater. These are non-harmful bacteria that can grow in extreme temperatures. They are even found in some hot springs. These bacteria take sulfate and change it into hydrogen sulfide (rotten egg smell). Remedy this by turning the water heater all the way up for 24 hours and then flush it and return the hot water heater to its normal temperature. Caution: Be extremely careful of scalding water during the 24-hour period. This water will burn very quickly. Extra caution should be used around children.

Bad smells can come up from drains and be mistaken for being in the water. Remedy this by checking to see if it is actually the water. Do this by filling a clean glass with the water and then take it away from the sink and smell it. If there is no smell, it is the drain and a licensed, professional plumber should be contacted.