I had the same problem, when the batteries get low and the volume is turned up the voltage would drop and shut off the head unit for a second. I also installed a larger dedicated power wire for the head unit.
Charge the batteries on a charger, not the boat alternator and see if the problem is still there.