An apparatus and technique for electrical stimulation of the central or peripheral nervous system based upon changes in position of the patient. A position sensor may be chronically implanted in the patient. One preferred mode uses a mercury switch position sensor which indicates whether a patient is erect or supine. This position information is used by a chronically implanted pulse generator to vary the stimulation intensity. The intensity may be controlled by changes in pulse amplitude, pulse width, number of pulses per second, burst frequency, number of pulses per burst, electrode polarity, or any other convenient parameter which accomplishes the particular medical purpose within an application. The output of the chronically implanted pulse generator is applied to the spinal cord, peripheral nerves, and/or targets in the brain with leads and electrodes in a manner consistent with the given medical need. Such stimulation is useful in the treatment of chronic intractable pain, hemodynamic insufficiency resulting in angina, peripheral vascular disease, cerebral vascular disease, various movement disorders, and bowel and bladder control.