Gently wipe the foam pillow with a solution made from warm water and a mild detergent. Do not machine wash the pillow.
Allow the pillow to dry. You may allow it to dry outside, but if you do, do not leave it in direct sunlight for more than 24 hours.
Sprinkle baking soda on the pillow and allow it to sit for at least a day. Vacuum the baking soda and turn the pillow over, repeat the process.
Wipe the pillow gently with a solution made from warm water and hydrogen peroxide. Allow the pillow to dry. You may allow it to dry outside, but if you do, do not leave it in direct sunlight for more than 24 hours.
Repeat the steps above. Allow the pillow to fully dry before sleeping on it. Keep the pillow smelling fresh by placing a fresh dryer sheet in the pillowcase, on the bottom side of the pillow.