If it is a "Marine" water heater like Raritan and has not been molested.. it will be certified and ignition protected.
The problem is termostats! You can go to the hardware store and buy a thermostat that will fit the heater and looks and works fine but... IT WILL NOT BE IGNITION PROTECTED!
I never investigated a boat fire where I was able to isolate the ignition source as the water heater. If there you have any doubt about the unit then replace the termostat with the proper marine rated unit. Oh they cost three times that of an unprotected one but.. lives can be at risk.
Some of the items I have found in engine spaces.
1. Automotive alternators
2. Automotive starters and selinoids
3. Automotive air cleaners
4. Cheap automive battery chargers
5. Residential water heaters and space heaters!
6. PROPANE TANKS!
7. Residential unprotected fans and fan motors
8. AC filiment light bulbs
7. Automotive fuel pumps
8. Automotive Distributors (Not ignition protected)
9. Inverters
10. Various open circuit relays etc.
The list goes on and on!
None