Water heater builds up excessive pressure only when reheating the tank. What's going on?
Your expansion tank has likely failed or isn't large enough for your hot water tank. Expansion tanks have a bladder in the middle that ensures it is half full of air and needs to be periodically checked to be sure it's properly pressurized. These bladders eventually fail, allowing water to enter the air side, which eliminates the ability to absorb the expanding water.

Replacing the expansion tank may be a simple process if it's just screwed on. With the water shutoff, you unscrew the existing tank, pressurize a new tank, apply some plumbing dope to the threads, and screw the new tank on.