It's fine if it's an airtight mattress such as polyurethane, but if it's a spring mattress, the moisture on the ground will penetrate the mattress, causing people to suffer from moisture erosion and get sick. As long as the ground is kept dry, nothing will happen.
you can spread something that can absorb moisture and prevent moisture, such as foam.