If your water smells and looks like curdled milk, there's really something nasty going on inside the system.
Lets get back to the hot water stuff. Most hot-water heaters on boats utilize the engine's cooling system to heat the water in the tank. This translates to water temperatures well below boiling, mostly in the 130 to 145-degree range. At those temperatures you cannot and will not kill any form of bacteria. In order to kill bacteria you need to reach 220 degrees and maintain that temperature for at least 20 minutes, and that's not gonna happen in a hot water heater - marine or domestic.
Bacteria will grow on just about any surface of any water system. The main reason being that water is not sterile and the surfaces it passes through are not sterile as well. The only way to effectively sterilize the system is to flush it regularly with chlorine bleach - it's that simple. Chlorine bleach will effectively kill all living cells, and that's when the bleach is just above 35-percent concentration. A much lower concentration will cleanse your system, but as stated earlier, the system must be thoroughly flushed after cleansing, and when the tank is refilled, a maintenance volume of chlorine bleach should be added to help prevent new, bacterial growth.
The recommended amount of chlorine bleach to add to the water supply is 8 to 16 drops per gallon. Even at that concentration I would not drink the water, especially if there's light beer available. And, at that concentration you should be able to smell the bleach when it's coming out of the faucet, just the same as you can smell the chlorine when you turn on tap water in any major city. I have been living on well water for the past 40 years, so the chlorine odor, at least to me, seems very pungent in most municipal water supplies.
Now, just because you used a municipal water source to fill your boat's tank, don't assume that it has sufficient chlorine content to cleanse your tanks - it doesn't! Municipal water supplies usually only contain enough chlorine to prevent bacterial growth in the system for approximately 48 to 72 hours. There is not sufficient choline to cleanse a heavily contaminated marine water system.
Essentially, you will have to use a process that most swimming pool technicians use every spring. Some refer to it as "shocking the pool," which is nothing more than dumping a large volume of chlorine in the pool to kill everything that lives. The water can be pea-green prior to shocking, but the following day it will be crystal clear. The system must usually be run through the pool filter for about three days before the water is safe enough for swimming. Keep in mind, though, that the chlorine must evaporate, which is easy with a swimming pool, but nearly impossible with a closed system, such as a marine water system.
Consequently, if your system has been shocked, the next step is to flush the entire system thoroughly until all traces of the bad stuff are gone and the water runs perfectly clean and clear. Then the maintenance dose of chlorine can be added to the system. When additional water is added, keep track of the gallons, then add an appropriate volume of chlorine to maintain the correct level.
Hope this helps,