Remove all sheets, and thoroughly vacuum both sides and the edges of your mattress.
Spray on a commercial mattress cleaner, following the directions on the can. Allow the spray to dry, then vacuum the mattress thoroughly.
If a mattress cleaner is not available, spray one side and the edges of your mattress with an upholstery shampoo. Follow all manufacturer's directions. Allow the shampoo to dry, and then thoroughly vacuum the sprayed areas.
Turn the mattress over, and spray the other side with upholstery shampoo. Allow it to dry, and vacuum it.
Spray urine stains with an equal mix of vinegar and water. Use a towel to blot the area after spraying. Spray up to three times (and blot each time) for particularly troublesome urine stains.
Lay the mattress on a clean area in the sun for two hours. Flip the mattress over, and allow it to receive two more hours of direct sun.
Cover your mattress with a mattress protector to keep it from becoming dirty again.