If it is not your dog call the police. They will issue a warning the first time and after that they will be fined then the dog will be removed. If it is your dog obedience training usually does the job but a one night fix is a garden hose. Hosing him down will shut them up after a couple of times until you can get him trained.
Is the neighbor someone you can talk to? I would assume not since he lets the dog bark for 4 hours. Have you thought of a white noise machine in your child’s room to mask the sound? It whooses, and does waterfalls or gentle rain. I used it when I was married to a snorer.
Call the police. Keep calling if it continues. Believe me, cops don’t want to keep coming back, and they get really annoyed if someone does not take heed to their warnings.
Why are all you people suggesting immediately calling the police? Why not go around to your neighbour’s place and ask them politely, or drop them a letter. If it still doesn’t work, then go to the police, by all means. No need to get the police involved when you can probably sort this out yourself easily.
Talk to owner they maybe surprised to know that it is Barking ( some people sleep with fans). I know the dogs next door and tell them that its okay and throw them treats the owner gave me, they just need to be told. Sometimes they are barking at a prowler so beware! Good Luck