Usually, this is caused by the ground like others mentioned, but also could be a speaker wire/subwoofer shorting out. All it takes is for one strand of wire close to a subwoofer basket and it could cause this intermittent issue.
First, run a dedicated ground to the battery just so your electronics are happy and does not cause issues in the future.
First, run a dedicated ground to the battery just so your electronics are happy and does not cause issues in the future.