Hi Fjaman - welcome to the forum.
It depends how mushy it is and what type of cactus it is.
What planting medium did you use? You need a very porous soil. One that drains very easily. Regular potting soil retains way too much moisture. You can get cactus mix at most nurseries and big box garden centers. You can amend potting soil with sand but you need to use Mason's sand or paver base sand. Very coarse sand. Play sand is too fine and will bind with the soil turning it into clay. Been there - done that.

Use 2 or 3 parts sand to 1 part potting soil.
Obviously your pot does not have adequate drainage.
I was in west Texas in October and my friend gave me some Prickly Pear cactus that grows like weeds out there. While harvesting I noticed new plants growing from pieces that had fallen on the ground. I saw pieces that had fallen on concrete putting out new growth. No soil contact at all.
If your entire cactus is not mush try cutting off the mushiest part and just set the part that is still firm on top of your sandy mix - skin side touching the mix not the cut surface. You may also try cutting off the worst of the mush and just set the remainder aside to dry a bit.
Even with a porous mix and a well drained pot I keep cactus and succulents under the patio cover where they get none of our copious rain. They get a sip of water every - HMMM - rarely.

There is so much humidity that little water is needed. The only time I water is if I notice the paddles getting thin. Cacti and succulents will tell you when they need water.
Good luck
