Our next door neighbor has two "real hunting dogs" as he calls them that are penned up all day and night. Their pen borders our fence.
They will often start barking in the middle of the night. My guess is an animal is close by, as we border 475,000 acres of Air Force Base.
When we first bought our house, we noticed a little black box hanging on our fence next to their pen. I googled a picture of the box and found it to be one of those no barking things. I put a new 9v battery in it. The lights all worked but it didn't do a damn thing to keep the dogs quiet.
Like you, I love dogs and have 5 rescues. But we don't allow ours to barking much anytime, let alone in the middle of the night.
The owner brought me a bunch of deer meat one day after a long night of barking, so at least he recognizes the issue.
I keep ear plugs on my nightstand. I also bought and installed high density foam in the two bedroom windows. Seems to help a little!!