As long as the cushion material isn't degraded so far that it turns to dust when you squeeze it...
A kiddy pool filled a few inches with warm soapy water (go light on the soap or you'll be rinsing till the cows come home), squish the water in and out of the foam. It's easiest to walk around on it with bare feet for a few mins. Could use your bathtub too if the pieces are small enough and you don't mind cleaning up the mess.
Dump the soapy water and fill with fresh water along with draining the foam out quickly between steps and repeat this process till you get the soap out of the foam.
Hang it or prop it up for a couple hours, this should get most of the water to run out of the foam.
A closed room with a dehumidfier is the easiest way to completely dry it. Otherwise a shaded hot spot with some air movement on a sunny afternoon for a few days with flipping it often should do the trick to pull the remaining moisture out.
Hope that helps...