Your water pipes could easily be the cause of water stains on your ceilings. There are a variety of problems that can lead to pipe leaks, such as deterioration, inadequate insulation, hard water, or improper installation. Brown spots are usually the result of water intrusion of one type or another, although the stain can also be caused by mold or cigarette smoke. If you can identify the spots as water spots, you'll want to determine the cause right away.
If it's brown and sudden, I think a leak or a faucet left running unattended causes an overflow. A small leak is more likely to appear wet and moldy. The main causes of water leaks and damage to bathrooms include the use of old sealants that need to be replaced, a pipe cover, clogged sink drains, or a toilet overflow. Of course, if an active leak occurs in the bathroom or in the pipes, you'll also want to hold back the water as much as possible and cut off the water supply to the leaking pipe to keep the problem from getting worse.
Finally, if the water quality itself resembles that of a horror movie about minerals, installing a whole-house water softener is the only infallible prevention plan against these annoying accumulations of incrustations. This comprehensive approach restores the structural integrity of the house and, at the same time, prevents mold, rot, or new water stains from reappearing along the way. If the water stain on the ceiling appears to be due to a problem in the bathroom, you'll need to quickly identify the source of the water leak. Check the roof for common signs of water damage, such as exposed nail heads, missing roof tiles, unfastened gutters, fallen spots, or blockages in the gutters.
If roof tiles are damaged or completely missing, the roof is vulnerable to water intrusion. This situation can cause water intrusion and the formation of brown spots on the ceiling, indicating that there are problems with water. Mold on ceilings is usually striped and blotchy in nature and is usually blacker or greener than the type of brown that appears when water damages it.