Baking soda and vinegar are two effective ingredients to clean dirty mattresses. These can clean the dirt without causing any harm.