By chance are you running your 4 in-boat speakers off of your head unit power only?
Are you using the high-level input on your sub amp, connecting to the radio's speaker leads to get signal to the sub?
Most people will not wire a stereo this way these days, but it could still happen...
If by chance what I described above is accurate, what you are experiencing is an acoustic feedback loop. The speakers conencted to the radio might be acting literally like microphones...
If this is the case, you either need to reverse the phase of the woofer spekaer wiring, OR, you need to turn down the sub amp gain, OR both. OR, if you have RCA line level outputs on the back of the radio, use those to get signal to the amp input as opposed to tapping the high level signal at the speaker(s).
What I describe above should be a stretch for a modern boat install but you never know...
I have fixed a few of these exact scenarios in cars over the years...
Phil
Kicker