If there are no spills or strains over your mattress and it still smells musty, you can follow simple steps to freshen it up. The simplest way is to spray your mattress with a good quality antibacterial air freshener. Apply small quantity of air freshener to all parts of your mattress and let it dry.
You can use the baking soda from your kitchen and sprinkle it over your mattress. Let it there over night and then clean it up with a brush or a vacuum cleaner. Baking soda has tremendous properties to remove foul smells from clothing and it is widely used for this purpose besides cooking.
Sunlight and air can also serve for good deodorising of your mattress. You can simply take out your mattress on a sunny day and expose it to direct sunlight. The sun heat will kill out any dust mites and bacteria within the mattress and finish off the stale smell of it.
If you have spilled drink or anything else on your mattress, you should use a cleanser containing citrus to wipe it off. Spray a small amount of cleanser on the stain and leave it for an hour so that the mattress can absorb it properly. Take a dry towel and blot the stained area of the mattress.
Mildew is the other common cause which can lead your mattress to smell musty. If only a small portion of your mattress is affected with mildew, it can be treated but if the entire mattress is impinged on, you need to replace it. You can take your mattress outside and use a car vacuum to remove mildew from it. Let the mattress in sunlight and air for a while afterwards.