said by hitachi369:How far is the room from the hot water heater? If it is far enough away the pipes could be cold. When the hot water turns on the pipes the pipes expand, and then cool back down. Causing a contraction in the pipes, causing it to knock, just like a hot car that cools down and pings.
I doubt it could be the cold, never had this problem until about 8 years after we owned the house.