It is highly advisable that you keep your mattress well maintained. This involves regular cleaning of the mattress and maintaining proper personal hygiene.
You must get a washable matress cover to protect your mattress from spills and dust and germs carried by your kids, pets, aged parents etc. Good quality mattress protectors are machine-washable as well as long lasting.
You must vacuum the mattress on both sides regularly to ensure that all dead skin, hair strands etc are removed.
You can also spray the mattress with a disinfectant on both sides.
Steam cleaning, airing and sun-drying the mattress are also recommended. You could try to use an upholstery cleaner.
You could also try using enzyme cleaners as they can break down the ‘structure’ of the stains which helps to loosen them effectively
Maintaining cleanliness of our bodies before going to bed also helps to keep our bedding and mattresses clean. You should make sure that no one in your house sleeps without having a shower. You might be carrying germs from outside which could easily get into the mattress.
Not using the bed for anything other than sleeping is also a healthy habit to develop which also helps to keep your mattress free of germs n other contamination.
If there is an odour emanating from the mattress, or if you doubt that it might be infested with dust mites or if there have been any accidents of urine or stools leaking on the mattress, you might want to check if the soiling is only on the surface or has it seeped deep inside the mattress. Such extreme situations might warrant professional cleaning using high suction vacuum cleaners for complete sanitization. Wrapping the mattress in plastic film for a few days to weeks may also help to kill all mites and eggs, if indeed there is an infestation in the mattress.
Please note a mattress is not meant to be washed with water. If you try doing that, the moisture is likely to end up destroying the mattress instead of cleaning it.