Using a simple, rapid solvent evaporation process, the authors produced 3D carbon nanotube (CNT)/polydimethylsiloxane (PDMS) foams with both high thermoelectric (TE) and good mechanical performance and used them to fabricate highly flexible and durable TE generators. The numerous pores and interfaces in the CNT/PDMS foams, which have porosities exceeding 87%, afford very low thermal conductivity of 0.13 W m−1 K−1. The foam has a zT value of 6.6 × 10−3, which is twice as high as that of pristine CNT foam. Importantly, the CNT/PDMS foam exhibits good tensile strength of 0.78 MPa, elongation greater than 20%, and excellent resilience even at compressive strain of 80%. This foam is used to fabricate a highly flexible TE foam generator that exhibits a moderate output power of 1.9 µW generated from the large temperature gradient of 18.1 K produced by applied heat. The authors also demonstrate a practical TE foam generator that produces sustainable output power of 3.1 µW under a compressive strain of 80% and 38.2 nW under the continuous vibrational stress produced by a car engine. The TE foam generator also exhibits excellent stability and durability under cyclic bending and harsh vibrational stress.