Replacing kitchen sink, hot water valve under sink fails to stop water flow
Replacing a leaking stop valve requires shutting off the water upstream. If your water heater is the next practical upstream shutoff location then it is fine to shut it off there.

If there is a shut off valve available on the water heater outlet then you do not have to shut off the water heater if you complete the repair in a reasonably short amount of time (a day). Is this case you would not drain it. You should close the inlet to the water heater, open a hot water faucet downstream, then close the water heater outlet valve. This will relieve stored pressure in the water heater.

If there is no shut-off on the outlet and you shut it off on the inlet then you still do not have to turn it off as long as the stop valve repair is above the height of the heater, as it will remain full of water.

If there is no shut-off on the outlet and the stop valve repair is below the level of the water heater, the water heater may drain out as you open a faucet to relieve pressure on the line so you can work on it. In this case you should turn the water heater off.

So...


There is no need to drain the water heater
if the water heater remains full and the repairs can be completed in a reasonably short time, there is no need to turn the water heater off
if the water heater is or becomes drained for any reason, it must be turned off immediately