Picture it: You climb into your cozy bed, snuggle up under the duvet, and drift off to sleep…only to wake up a few hours later totally drenched in sweat.

Miserable? Yes. Also kind of scary? Yes to that, too.

Most of the time, your night sweats could be caused by something totally harmless—like the temperature of your bedroom or the fabric of your PJs.

But sometimes, your sweaty nights might be a sign of an underlying condition you need to get checked out ASAP, says Dr. Neomi Shah, associate professor, pulmonary and sleep medicine, at the Icahn School of Medicine at Mount Sinai.