Is it really five minutes, thats a long time for a dog to continuously bark.
Thing is.. if they know, they're probably no happier about it than you are, but if a dog is startled awake and shouting, there isn't much you can do in the moment to stop that instantly - you can't shout at the dog, as the dog either thinks you're joining in or you are just adding to the noise. You can go and get the dog but that means you need to be woken, get up, go get the dog and that isn't instant.
One of mine was waking early and yelling out of my bedroom window, we've resolved that by blocking the gap in the open window (the glass has frosted film on it) with a fabric piece so now she can't see out. But again not an instant solution!
If they DON'T know or don't care... its even harder.
As far as noise pollution laws go, it is recognised that dogs do bark and it isn't unreasonable for dogs to bark when startled, but long periods of barking during the night are not reasonable, no.
I would stick a note through if you're certain whose dog it is just asking if they're aware and if there is some solution, closing a dog flap, shutting a window, having the dog sleep in another room so it isn't woken by noises etc. If you don't ask, you don't get after all!