I'm a big proponent of proactive maintenance. I'd much rather deal with planned repairs than emergency repairs and unexpected breakage. Your hot water heater probably isn't a safety issue (unless it leaks toxic green antifreeze into water you use for washing dishes and cooking). But... emergency repairs made under duress always cost more, frequently are done "good enough" and should be done better, and they can ruin your day (or vacation).
In my prior boat I replaced this 10-year-old stainless holding tank before it leaked into the bilge (there's only so long a stainless tank should be expected to hold urine). It was a big job and I had to cut out the cabin sole. A hot water heater is easy in comparison.
Uh-Oh. This doesn't look good: "When" will it leak? Not "if".
Cabin sole removed.
Tank is out. Lots of fiberglass dust and bilge grime!
Looking better.
Putting that space to use as a storage area. We used it for bottles, canned goods etc.
Finished.
Relocated tank under V-birth gave us more usable tank capacity and occupied space that was inconvenient to access when we were on vacation (and the v-berth was made up with sheets). I added a shelf above it so we could still put some stuff over it.