While you may put smaller objects with foam in your washing machine, larger foam objects such as couch cushions require hand cleaning to remove certain odors and stains. Mildew occurs because of a high exposure to humidity on any textile fabric over an extended period of time, eventually leading to mold. This leaves them with a musty smell that might make you or guests uncomfortable.
Let your foam material sit in the sun with plenty of ventilation for about 24 hours.
Sprinkle 1 tbsp. of baking soda lightly on your foam. Use more if you run out. Allow the baking soda to settle for a day. This absorbs most of the odor.
Shake the material out and vacuum it to get rid of most of the baking soda.
Dip some vinegar into a spray bottle and spray it lightly on your foam material. Let the foam sit outside in the sun until it dries. This process disinfects the material and deodorizes it once the vinegar dries out.