Consequently, sensor 63 may include an electrode pair, including one electrode integrated with the housing of an stimulator 14 and one of electrodes on leads 16, that generates a signal as a function of the thoracic impedance of the patient 12, and processor 58 may detect the posture or posture changes of the patient 12 based on the signal.