Make sure you take all the sheets, etc. Off. Then try laying it out in the sun for a day or two. Bring it in at night, and if there's any chance of rain again. It's best to get it out into the open air as fast as you can, or it will mildew & be unusable. It also depends on how wet it got. If it got really soaked, you may need to toss it out & get a new one. Air dry it a little longer than you think it needs too, so it dries on its inside. After you feel it's dry enough, spray it with some Febreeze or Lysol, & let that dry well. Then bring it inside & you should be good to go.
You don't. Throw it out. You'll never get it dry before mold sets in.
Let it air dry
If it is soaking wet from water, it will take 3-6 days of sitting in the sun. Mattresses are made with different materials. Most people when a mattress gets soaking wet will just toss it. It is the smell that comes out of it and is sometimes overwhelming.