Thanks for your question and welcome to the forum. If I was in your situation, I would definitely try baking soda first.
I almost had to throw my heating pad out because of how musty it smelt. I laid the heating pad flat on the floor, sprinkled a good amount of baking soda over the entire surface (making sure it coats evenly) and then let it sit for a day. Dispose of old baking soda daily until the odor is no longer there. It took probably 3 days to get the smell completely out, but in my opinion it was worth it (a couple bucks spent on baking soda is a small price to pay!)
Almost any sort of fabric that can’t be thrown in the washing machine can be deodorized this way, which is why I always buy baking soda in bulk.
Vinegar will work, as well as the fresh air, but I’d definitely try the baking soda method first.
Let me know how it works out and if you were able to save your mattress!