I've actually washed foam mattresses with soapy water (important not to use too much detergent) and then man handled (am I allowed to say "man handled" these days

) them into the washing machine and put on the spin cycle. Or you can leave them sitting on the clothes line for a week to dry out (good weather needed of course). It all depends on the size of the mattress and if you have plenty of fresh water to rinse the detergent out and then some where to dry it back out.
I've never heard of any miracle spray or easy fix especially if the mattress has any salt build up in it.