An active implantable medical device for vagal stimulation with optimization of ventricular filling is disclosed. The device delivers stimulation pulses to the vagal nerve of the patient with an adjustable energy level. The device includes a hemodynamic sensor for measuring hemodynamic parameters of the patients cardiac cycles and delivering a timing parameter representative of the ventricular filling time. The energy level of the vagal stimulation pulses is adjusted dynamically and repeatedly over several cardiac cycles. The energy level is varied during successive cardiac correlative changes in the filling time (FT1, FT2) are assessed (46), and the energy level is set to a level that maximizes the ventricular filling time.