Excessive moisture can cause a motor to run hot. This is because the moisture penetrates the insulation material and degrades its insulating properties. The moisture creates parallel leakage current paths through and over the surface of the insulation.
If you suspect or detect moisture, don’t run the motor under the assumption that doing so will dry out the motor, the problem will solve itself, and everything will be fine. Running a moist motor stresses the motor, and often damages its insulation.
If you think the problem is due to moisture, you need to dry out the motor without running it.
To prevent recurrence, you may need to do some serious troubleshooting. But at a minimum, at least look for obvious causes; in most cases, doing so will enable you to solve the problem permanently.
For example, a motor is in a damp location and runs infrequently, so condensation forms once the motor cools. A common solution is to install a heater that dries out the windings.