Circuitry is disclosed for determining a posture of a patient having an implanted neurostimulator and for adjusting the stimulation to be delivered by the neurostimulator based on the determined posture. Impedance measurements (130) of the patient's tissue are to be made at the electrodes (140) of the neurostimulator. The impedance measurements can be interleaved with stimulation therapy and are to be used to determine an impedance fingerprint (150). This impedance fingerprint can be compared to stored impedance fingerprints associated with particular stimulation programs. When a measured fingerprint matches a stored fingerprint, the stimulation program associated with the stored fingerprint is automatically selected to be used for patient therapy. As different measured fingerprints are encountered, new stimulation programs for such fingerprints can be learned and stored, the stimulation parameters being those selected by the patient for the determined fingerprint.