An overflowing water heater may be caused by problems with the temperature and pressure relief valve (TPR) when the temperature or pressure becomes dangerously high. Or, it could be because of thermal expansion when the element heats up and the volume of the water inside the tank expands, causing it to overflow.