I'm pretty sure I know what you're talking about. It happens after shutting off the truck? Takes a second or two before it starts humming? If so, I've had it happen to me plenty of times. Never figured out what it was, but I always take a few seconds after everything starts powering down and I'll listen for it. If I hear it, what I've always done was turn the accessory power back on and it'll stop.Then I shut everything back down. No more hum. It's been a regular occurrence for as long as I remember, doesn't happen all the time, but that's been my solution and it's "fixed" it everytime. Haven't run into any issues with it.
But it does make me wonder if it was perhaps related to the random battery drain I had a few years ago after buying it brand new and about four months of ownership... Don't think I noticed the noise til a bit after that.