Hi
The overflow is actully the outlet pipe for the pressure relief device. This is known as the PRD and it will only vent water if there has been an overpressure situation inside the heater tank. The hot/cold cycling situation you described is the likely precurser to the PRD opening up. Are you in a hard water area because the heater tank may be furred up causing a reduction in water flow through the heater tank and this may have caused a pressure build up inside the heater tank.
You will need an engineer visit to check the shower.
garryk
April 2010