When you turn on your water, you expect the water to flow through the pipes without making much noise or ruckus in the process. The only sound you should really hear is that of water hitting the bottom of the sink basin. If there is also a rattling in the pipes as the water flows, you're sure to find this annoying— especially in the middle of the night! Thankfully, there is almost always a simple solution to rattling pipes.
Try emptying and refilling your pipes.
The sound may be caused by what's known as a water hammer. This occurs when one of the vent pipes in your plumbing system gets blocked and an air bubble gets trapped in the pipes. An easy way to fix water hammer is to turn off your water main. Then, turn on one of the faucets to let all water drain from the pipe. (You may want to turn on a second and third faucet to ensure water is drained from all branches of your plumbing, depending on your plumbing layout.) Once the pipes are completely clear, turn the water main back on. With any luck, the problem will have been solved.
Lower your water pressure.
If emptying and refilling the pipes does not work, the rattling may be caused by water pressure that is too high. Does the water come shooting out of your faucet at high speed? This is additional evidence of high pressure. Arrange to have a plumber come and install a pressure regulator in your system. This will slow down the speed at which water flows through the pipes, which should stop the rattling.
Have your plumber tighten pipe mounts.
While your plumber is on-site to install a pressure regulator, you can also have them look at the pipe mounts, which are the metal brackets that hold the pipe against the wall. Your plumber can tighten these brackets so that the pipes do not move as much as water flows through them. After this is done, you may not actually need a pressure regulator installed. But in most cases, a combination of tightening the mounts and somewhat decreasing the pressure is a good solution.
You do not have to go on living with noisy, rattling pipes! Try clearing the vents by turning the water main on and off. If that does not work, get in touch with a local plumber for plumbing repairs.