Seems to me like the cable feeding the water heater may be too light and is overheating when the load is switched on through it – I would suspect this to be the case if it has done this ever since it was first installed.
If it is happening after a considerable period from initial installation I would check the cable for rodent attack spots as it is likely if the residence is not regularly used then perhaps a mouse or something has chewed the cable causing a short in the wiring.
If the thermostat in the water heater has “blown” or go to open circuit then this would cause a circuit breaker to trip as well, have this tested first before doing anything else.
Selgas Services Ltd
Craftsman Gasfitters, Plumbers, Electrical Service Technicians