@literally45-- If you didn't have any night sweats before taking sertraline, then it's most likely the drug causing it. If you had some mild night sweats before taking sertraline, the drug might just be exacerbating that symptom. Are you under extra stress lately?
Night sweats actually do occur with stress, anxiety and depression. Whenever I've had depression, I've also had night sweats. It's the body trying to cope with the extra stress. Some people also suffer from nightmares due to stress and this can trigger night sweats as well. So it might not just be the sertraline.