Fire and water damage is often best left to the experts with many issues to overcome including the frame & contents of the upholstery as well as potentially hidden factors like mould & odours.
What can be helpful in smoke damage is thorough vacuuming of all surfaces affected – this will reduce the potentially damaging attack by the acids found in many types of smoke.
In water damage situations the prompt action of separating the furniture from the carpet can pay huge dividends in terms of stopping stains from furniture being absorbed into the carpet. Likewise, water will not be absorbed into furniture legs. This can be achieved by using tinfoil under the legs as a barrier to moisture. If the water is deep, use plain unfinished white wood to raise the furniture out of the water.