Plumbers call it 'water hammer', sounds a little like knocking, right?
Water hammers or knocks because it is rushing through the pipes and is suddenly cut off, usually by a solenoid valve. Solenoid valves are fast-acting and are found on your automatic washer, dishwasher and ice maker. Some folks like to hit a single lever to turn it off and get the same results.
To prevent 'water hammer' you need to add a cushion of air (air will compress and water will not), by putting a tee in a horizontal line and extending a piece of pipe vertically, at least 12" and cap it. There are also manufactured 'water hammer' arrestors at the plumbing supply house. The 'water hammer arrestor' should be placed near the solenoid valves mentioned above.
Another noise maker is pipe that is passed through a framing member (stud, joist, etc.) that is in a bind. When the hot water is turned on the pipe expands and the friction makes a popping sound. When the hot water is truned off, the pipe shrinks back down making the same sound. Some say it sounds like a leak (drip, drip, drip) in the wall but never find any water from the leak. If you can locate the popping or 'leaking' sound just apply a little petroleum jelly so the pipe can slide freely.
I hope you can get it done without your husband knowing, then you can wear a gold star for 3 days.