A device for the automatic and dynamically adaptive control of the stimulation of the autonomic nervous system (ANS) of a mammal comprising; a means of electrically stimulating the ANS, a means of measuring the heart rate variability (HRV) of the mammal and an electrical control unit, the electrical control unit being operable to provide a variable electrical signal to the stimulation means, whereby the electrical control unit produces an output which varies according to a mathematical function based upon the magnitude of the difference between the recently measured HRV values of the mammal and the stored range of HRV values taken over a period of time from the mammal in a resting state.