Blot it up fast
Press clean white cloths or paper towels down hard to lift as much liquid as you can before it sinks in, and keep swapping them until they come up nearly dry. The less that soaks into the foam, the easier the rest of the job and the less risk of trapped moisture later. Do not rub, which spreads it and works it deeper.
Treat it with an enzyme cleaner
Urine is a protein, and an enzyme cleaner is what breaks it down rather than masking it. Lightly spray or dab the enzyme product onto the spot — enough to reach the stain, not enough to soak the mattress — let it dwell for the time on the label, then blot it back out. For an older or set mark, a paste of baking soda with a little hydrogen peroxide, tested on a hidden spot first, can help lift the stain and smell.
Never use heat
Heat permanently bonds urine proteins, so a steam cleaner, hot water or a hot hairdryer held close will set the stain and lock in the smell. Treat urine with cool water and enzymes only, and use heat sources, if at all, from a distance and on cool just to dry — never to clean the spot.
Dry it completely, then protect it
A mattress cannot dry from the inside, so any moisture left in it grows mould — which is why drying matters even more here than the stain. After treating, blot out every bit of moisture you can, then dry the spot fully with a fan, open windows or indirect sun before remaking the bed. Going forward, a washable mattress protector catches accidents before they ever reach the mattress.

