Blot any liquid spills with paper towels to absorb as much moisture as possible.
Remove the foam from the upholstery. There will typically be a zipper or closure that allows you to easily slide the foam in and out of the upholstery.
Mix 3 cups of water with 1 tsp. of laundry detergent. Stir to create soap suds, then dip the cloth into the soapy water and wring it out.
Wipe the damp cloth over the foam, and repeat until the foam has been cleaned to your liking. Also remember to clean the underside of the foam, as spills and stains will often penetrate to the opposite side of the foam.
Fill a spray bottle with white vinegar, and spray onto the cushion if the stain is caused by any bacteria-forming substance (for example, urine, feces or vomit). The vinegar will not only disinfect the foam, but will also deodorize the surface, eliminating any odor that could potentially form from the bacteria growth.
Allow the foam to air dry, placing it in direct sunlight when possible.