A device includes a pulse generator coupled to a neurostimulation lead placed around the nerve and a set of electrodes individually connected to the generator by a splitter circuit controlled to preferentially stimulate certain regions of the nerve relative to other regions. The device performing an iterative search of an optimal configuration operating by selection of a plurality of different stimulation configurations, storing of a cardiac physiological parameter measured for each selected stimulation configuration, and designation as optimal stimulation configuration of the one of said selected different stimulation configurations, depending on at least the stored values of the physiological parameter measured for different electrode configurations.