Hello, It would be good to know a lot more about your system. It could be the water heater, but it could also be other equipment, or an effect of thermal expansion … or? So, a few things… can you list what is in the plumbing, like water filter, pressure reducer, check valve, softener, etc? Also, can you make a recording of the sound and post it so we can hear? Lastly, get a 0-200 psi gauge and install it on the water heater’s drain valve. Pressures should be in the 40-60 psi range. If it’s ever a lot higher than that, it would be a useful clue.
ps, one trick you can try is to turn your heater to the pilot position (if it’s gas) overnight and see if it quiets down. Or just shut off power at the breakers. That would hint at thermal expansion being a problem if the noise stops. 😉