This can occur as a result of the carpet being contaminated by sewage or even by prolonged exposure to moisture, which causes the carpet to delaminate. Delamination is the loss of structural integrity of the carpet due, in part, to the breakdown of the latex adhesive. Prolonged exposure to moisture causes latex adhesive to lose its elasticity. When the elasticity is gone the adhesive that binds together the primary carpet backing, the secondary carpet backing, and the yarn which forms the tufts in the carpet, can no longer serve its purpose. It essentially means that the carpet is falling apart.
Time is the critical factor here.
If allowed access to a job soon after a water damage has occurred, the restoration contractor should be able to save the carpet and pad under normal circumstances. Once the structure has been dried and the repairs are complete, the carpet should be resecured. This includes re-engaging the carpet by either attaching it to the tackless strip around the perimeter of the room or adhering it to the floor. This resecuring should be followed by thoroughly cleaning and deodorizing the carpet. It may seem that because everything is dry, the job is finished and normal activities may resume.