Two caveats. In a closed water cooling system, or a fresh water cooling system, you can use a 160-180F thermostat and that gives you better engine performance, and hotter hot water.
In a raw water cooled engine, a 140F thermostat should have been used to prevent salt crystals building up in the engine. So, check the thermostat, you should be running the hotter one spec'd for your engine.
Automobile thermostats usually are simple open/close valves. Boat thermostats are usually (not always) "Y" or "T" valves, that allow the raw water to be dumped into the exhaust when the engine is cold, because that water is being pumped all the time, and the exhaust is a convenient way to dump it. As the engine heats up, the flow is diverted through the engine block to cool it--and then routed to the exhaust to cool it on the way out.
So how your thermostat works depends on how your cooling system is set up. If you have the diverter setup, make sure you are not splicing into the cold "dump" side for your hot water tank, it wouldn't work at all.
Wherever your water comes directly OUT of the engine block and then goes INTO the exhaust, that should be the final stop where the heated water can be tapped and sent into the hot water tank, and then back out to the exhaust. Route those hoses carefully, and carry an extra piece of hose so that if the water heater fails, you can pull the hoses and restore the direct flow into the exhaust. You may also find the hot water tank uses a sacrificial anode (a zinc) to protect the coils in it. If it does--buy a couple of spares now, and make sure to keep up with them, as well as any similar zinc that goes in the engine block. (Some have a zinc in the block, others don't.) Running raw water through it will be harsher on the heating tubes than a closed water system would have been. Make sure the manufacturer intends it for this purpose.