Is there a reason that most chargers I've used say to take batteries out of the boat to charge them. I could see disconnecting from the cables but why take them out?
As wet-cell batteries charge, they let go of hydrogen gas, which is explosive. They don't let go of much, but in the close confines of your engine compartment, it can be enough to cause trouble.
I personally don't think they let go of enough to have a real worry, but all the manufacturer needs is one person to sue for a few hundred million and they're out of business ... so they error on the safe side.
If the battery is in a covered hatch, leave the cover open when charging. This provides air circulation and prevent gas buiod-up. It is also unnecessary to disconnect the cables. Your car battery is charged continuously and obviously the cables are not removed.