When does the foghorn blow?
For example, is it at night, when the water is not running?
Happened to me - it turned out to be that after I added a pressure reducing valve, it caused the house piping to be a "closed" system. Under those circumstances, when the water heater heats cold water and makes it warm, the newly expanded water has no where to go, and can create all sorts of loud noises as the pipes expand.
If that's the problem, the solution is to install an expansion tank. Do a search on this site - it is discussed often.