Blot up any urine and pick up any feces with paper towels. If you get to the affected area while the problem is fresh, you have a better chance of effectively eliminating the odor.
Remove cushion covers and wash them in the washing machine, if possible. Read the manufacturer's instructions carefully to ensure that the material is machine washable. Add 1 cup of white vinegar to the rinse cycle to help kill the odor.
Mix 1 part white vinegar to 2 parts warm water in a spray bottle, and spray the affected area to lightly soak it. If the affected area is on a cushion cover that isn’t machine washable, remove it and lay it on a flat surface before spraying it with the solution. Scrub the area well with a clean cloth and inspect the foam cushion. Spray that also, and set them outside in the sunshine to air dry.
Sprinkle baking soda liberally over the furniture and allow it to sit overnight. The baking soda will help to absorb moisture and odors from the furniture.
Vacuum up the baking soda in the morning with the brush attachment of a vacuum cleaner.