Memory foam is engineered to absorb pressure - and unfortunately, it absorbs liquid the same way. Urine that sits on the surface of an innerspring mattress will wick down into the foam in seconds, taking odor-causing bacteria and uric acid crystals with it. The good news: if you act in the first 10 minutes, almost any accident comes out cleanly. The catch is that you have to clean it without soaking the foam, because a wet memory foam mattress can take days to dry and grow mold from the inside out.
Below is the method our editorial team has used on more than a thousand test mattresses. We split it into two playbooks - one for fresh accidents you catch immediately, and one for dried stains you find days later - followed by the drying step that almost everyone skips.
Before you start: 3 rules that protect the foam
- Blot, never rub. Rubbing pushes urine and bacteria deeper into the open cells of the foam.
- Mist, do not pour. Use a spray bottle so the cleaning solution sits in the top half-inch of foam, not the core.
- Skip ammonia, bleach and steam. Ammonia smells like more urine to pets and triggers re-marking; bleach degrades polyurethane; steam drives moisture deep and voids most foam warranties.
What you will need
- Distilled white vinegar
- Baking soda (a full box for a king-size accident)
- 3% hydrogen peroxide
- Liquid dish soap (clear, fragrance-free)
- An enzymatic cleaner (Nature's Miracle, Rocco & Roxie or similar) - required for pet urine
- Two clean spray bottles
- Stack of dry white towels or paper towels
- A vacuum with an upholstery attachment
- A box fan and, if possible, a dehumidifier

Fresh urine: the 6-step playbook
Use this if the accident happened in the last few hours. Speed matters more than perfect technique.
1. Strip the bed immediately
Pull off sheets, mattress protector and pillows and start them on a hot wash with detergent and a half cup of white vinegar. Anything left on the mattress just traps moisture against the foam.
2. Blot - do not press hard
Lay dry towels flat over the wet area and press down with open palms. Lift, replace with dry towels, repeat. You want capillary action to pull liquid up out of the foam, not your bodyweight pushing it deeper.
3. Mist with a 50/50 vinegar solution
Mix equal parts distilled white vinegar and cool water in a spray bottle. Mist the stain until the surface looks damp, not wet. Vinegar's acetic acid neutralizes the alkaline ammonia in urine and kills the bacteria that produce odor.
4. Blot again, then cover in baking soda
Wait two minutes, blot dry, then sprinkle baking soda generously over the entire area - a full one-eighth-inch layer. Baking soda finishes the odor neutralization the vinegar started and pulls remaining moisture up out of the foam.
5. Wait 8 to 12 hours
This is the step nearly everyone shortens. Baking soda needs at least eight hours - overnight is ideal - to draw moisture and odor compounds to the surface. If you vacuum after 30 minutes you are throwing the active part of the cleaning away.
6. Vacuum thoroughly with the upholstery attachment
Use a low-suction upholstery head and pass over the area in slow overlapping strokes. If any odor remains, repeat steps 3 through 6 once more. Two cycles will resolve the vast majority of fresh accidents.
Dried or set-in stains: the peroxide method
Once urine dries, the water evaporates but uric acid salts crystallize and lock the smell into the foam. Vinegar alone will not lift them - you need an oxidizing cleaner.
Mix the following in a clean spray bottle:
- 1 cup of 3% hydrogen peroxide
- 3 tablespoons of baking soda
- 1 teaspoon of liquid dish soap
Swirl gently to dissolve - do not shake, which makes peroxide foam in the bottle. Mist the dried stain until it is uniformly damp, then let it sit for 4 to 6 hours. The peroxide oxidizes the yellow chromophores in the stain, the dish soap lifts grease, and the baking soda neutralizes odor. Once dry, vacuum the residue. For old or repeat-offender stains, a second pass is normal.
Important caveat: hydrogen peroxide can lighten dark mattress covers. Test in an inconspicuous corner first. If you see bleaching, dilute the peroxide further or skip straight to the enzyme step below.
Pet urine: why you need an enzymatic cleaner
Pet urine is chemically different from human urine. It contains a higher concentration of uric acid, which forms insoluble crystals that vinegar, baking soda and even peroxide cannot fully break down. That is why a mattress can smell fine when dry but reek again the moment a humid day hits - moisture re-activates the crystals.
Enzymatic cleaners contain protease and uricase enzymes that digest the crystals into water, ammonia and carbon dioxide, which then evaporate. After the peroxide treatment dries, mist the area lightly with an enzyme cleaner, cover loosely with plastic so it stays damp for 60 to 90 minutes (the enzymes need time to work), then uncover and air dry. Skipping this step is the single biggest reason a pet accident keeps coming back.
Do
- Blot fresh urine within 10 minutes - speed matters more than method.
- Use distilled white vinegar diluted 50/50 with water in a spray bottle.
- Let baking soda sit overnight before vacuuming.
- Use an enzymatic cleaner for any pet accident, even after vinegar and peroxide.
- Dry the mattress with airflow for at least 24 hours before sleeping on it.
Avoid
- Pouring water or solution directly onto the foam - always mist.
- Rubbing the stain, which spreads it and pushes liquid deeper.
- Using ammonia-based cleaners - they smell like urine to pets.
- Steam-cleaning a memory foam mattress (voids most warranties).
- Putting bedding back on before the foam is fully dry.

The drying step almost everyone skips
Memory foam can hold residual moisture for days. If you put sheets back on a mattress that feels surface-dry but is still damp inside, mold will start in the foam within 48 to 72 hours - and once it is in there, the mattress is finished. Plan to lose the bed for a full day after cleaning.
- Open windows in the room and run a box fan blowing across the surface - not pointed at it.
- Stand the mattress on its side against a wall if possible. Air reaches both faces and gravity helps moisture migrate down and out.
- Run a dehumidifier in the room. Below 50% relative humidity, even deep moisture evaporates within 24 hours.
- If you can carry the mattress outside, two hours of indirect sunlight on each side accelerates drying and the UV helps with residual bacteria. Avoid harsh direct sun, which can yellow some foam covers.
- Press a clean dry towel firmly into the cleaned area before remaking the bed. If it picks up any dampness at all, give it another four hours.
Prevention: the one $40 purchase that pays for itself
Every cleaning method in this guide has a failure rate, and every cleaning cycle shortens the life of the mattress. A waterproof mattress protector eliminates 99% of the problem for around $30 to $50. We recommend a quiet polyurethane-laminated cotton or Tencel protector with a fitted-sheet design - vinyl protectors crinkle and trap heat. Wash it on hot every two weeks alongside your sheets.
If you have a young child still potty-training or a senior pet, consider doubling up: a thin absorbent pad on top of the protector. The pad takes the worst of any accident and goes straight in the wash, while the protector is the last line of defense for the foam.
Ready to start over with a clean slate?
If your mattress is past the point of cleaning - or you simply want to upgrade - our editorial team has tested and ranked memory foam, hybrid and latex options at every price point.
Frequently asked questions
Does urine actually ruin a memory foam mattress?
Not by itself, if you clean it within a few hours. The real damage comes from over-soaking the foam during cleanup, which traps moisture and grows mold. A single accident, blotted and dried properly, leaves no lasting harm. Repeated accidents on an unprotected mattress eventually break down the foam structure.
Can I use a wet/dry vacuum or carpet cleaner on memory foam?
We do not recommend it. Both push too much water into the foam and pull only a fraction back out. Memory foam is closed-cell on its skin and open-cell underneath, which is the opposite of what extraction cleaners are designed for. Stick to spray-bottle misting and blotting.
Is hydrogen peroxide safe on a memory foam mattress?
3% hydrogen peroxide is safe for the foam itself but can lighten colored covers. Always spot-test in a hidden area first. If your cover is dark or printed, dilute the peroxide 50/50 with water or skip to an enzymatic cleaner.
How long should I wait before sleeping on the mattress again?
Plan on a minimum of 24 hours of active drying - fan, open windows, ideally a dehumidifier. Press a dry towel firmly into the cleaned area before remaking the bed; if it picks up any dampness, give it another four to six hours. Sleeping on a damp memory foam mattress is the fastest way to grow mold inside it.
Will baking soda alone get the urine smell out?
Baking soda alone handles light, fresh accidents but leaves uric acid crystals behind on dried stains. For dried urine - especially pet urine - you need a peroxide solution followed by an enzymatic cleaner. Baking soda is a finishing step, not the whole job.
What if the smell comes back on humid days?
That is the signature of uric acid crystals reactivating with moisture. It almost always means a pet accident was cleaned with vinegar or peroxide alone and never treated with an enzymatic cleaner. Re-treat the spot with an enzyme product, keep it damp under loose plastic for 60 to 90 minutes, then air dry fully.




