Traditional humidity sensors for respiration monitoring applications have faced technical challenges, including low sensitivity, long recovery times, high parasitic capacitance and uncalibrated temperature drift. To overcome these problems, we present a triple-layer humidity sensor that comprises a nanoforest-based sensing capacitor, a thermistor, a microheater and a reference capacitor. When compared with traditional polyimide-based humidity sensors, this novel device has a sensitivity that is improved significantly by 8 times within a relative humidity range of 40–90%. Additionally, the integration of the microheater into the sensor can help to reduce its recovery time to 5 s. The use of the reference capacitor helps to eliminate parasitic capacitance, and the thermistor helps the sensor obtain a higher accuracy. These unique design aspects cause the sensor to have an excellent humidity sensing performance in respiration monitoring applications. Furthermore, through the adoption of machine learning algorithms, the sensor can distinguish different respiration states with an accuracy of 94%. Therefore, this humidity sensor design is expected to be used widely in both consumer electronics and intelligent medical instrument applications.