Most mattresses should be turned twice a year to equalize wear. This is a good time to vacuum the mattress, and the box spring, too, using a brush attachment and crevice tool. Vacuuming removes a surprising amount of dust, and it drastically reduces the population of dust mites, whose fecal matter is a leading cause of allergic reactions.
Many mattress odors can be removed by sprinkling baking soda on the surface and leaving it there for at least a day. Vacuum it up using a crevice tool and brush attachment.
If urine stains are a problem, apply a pet stain and odor removal product containing enzymes, following all label instructions closely. Other kinds of stains may be removed with upholstery cleaners. In either case, try to stand the mattress on its side and use liquids sparingly to keep them from soaking too deeply into the mattress padding.
Reference:
Consumer Reports editors in How to Clean and Care for Practically Anything.