The last major reason for poor water quality is not from living algae, but dead plant life that forms a brown sludge. This usually takes the form of muck on the bottom of the pond or brown discoloration of the water.
When algae, leaves, and other vegetation dies and falls to the bottom of the pond it begins to rot releasing toxic gasses and forming a layer of muck. Over time, this layer can become thick and reduce the water quality. The gasses produced usually leave the pond quickly in the summer, but during the winter months can become trapped under the ice and poison your fish.
There are a few ways to combat the buildup of this sludge. They are best used in conjunction with each other.
Physically removing the sludge from the bottom of the pond is the single most important thing you can do to keep your pond healthy. The best tool we have found for this is a vacuum made by OASE. We have a fleet of these available for rent or purchase.
This vacuum pulls water and sludge out much in the same way that an ordinary shop vac would, but it also discharges as it's working. You don't want to try to filter and reuse the dirty water. Fresh, de-chlorinated tap water is much healthier. It is much better to send the dirty water down the drain or let it flow into your yard where it will act as a fertilizer. You can use any shop vac for this but with most you will have to stop and drain them every few minutes.
There are bacteria cultures you can add to the pond that break down the sludge and recycle it into the pond as fertilizer for plants. This will help slow the buildup but won't stop it completely. These are very effective especially in large complex ecosystems but they are not a substitute for vacuuming.
Prevention is the best solution. You will never stop sludge build up completely but you can reduce it dramatically with regular maintenance. Remove any dying vegetation and keep the algae growth in check. Letting a pond stay green is the single worst thing you can do for the general health of the fish and plants. These are the two biggest sources for sludge so you can keep it under control by stopping it before it starts.