Your description of your problem sounds like a limit switch is kicking out and has to be reset by turning the switch on. A good suspect for a limit switch is the temperature of the water. Try lowering the water temp by 5 or 10 degrees and see if it continues to kick out.
You should have an owner's manual which has a wiring schematic in it. This will help you to find the temperatrue limit switch which, if lowering the temp didn't work, may be defective. Make sure the power is off and remove the limit switch and take it with you to get a new one. While you have the wiring exposed, look around for a burned off wire. The wires sometimes get too hot at the point of terminus and burn off. Look for wrinkled or blackened insulation on the wires.