String lights are low-power devices, but leaving them on for long periods still generates heat, especially when they are coiled together. Use an outlet with a timer and set it to 18:00–23:00; for battery-powered ones, turn them off before bed and check the battery compartment for moisture.