Flexible thermoelectric materials enhance energy harvesting by conforming to diverse heat sources, improving conversion efficiency. We systematically investigated the thermoelectric properties of flexible CNT/elastomer nanocomposites, varying elastomer types and concentrations. Furthermore, we introduced various ionic liquids to optimize both the thermoelectric and mechanical characteristics of these nanocomposites. Our studys demonstrate that the thermoelectric properties of CNT/elastomer nanocomposites can be effectively modulated through the addition of selected ionic liquids. This approach allowed us to achieve high electrical conductivity and Seebeck coefficient while maintaining flexibility. Utilizing the optimized CNT/ionic liquid/elastomer nanocomposite thermoelectric material, we constructed flexible thermoelectric generators (TEGs) that exhibited a maximum output power of 21.05 μW at a temperature gradient of 22 K.