The present invention relates generally to implantable medical devices and more particularly to systems and methods for optimizing the stimulation of a heart of a patient. The method comprises delivering pacing therapy to the patient according to a pacing therapy setting schedule, wherein a pacing therapy setting according to the pacing therapy setting schedule comprises delivery of pacing stimulation using specific pacing intervals via specific electrode configurations. Further, sinus rate values are recorded over at least one cardiac cycle at each pacing therapy setting and it is determining whether a sinus rate value satisfies predetermined measurement conditions, wherein sinus rate values are used for trending the sinus rate over time if the measurement conditions are satisfied. The accepted sinus rate values, i.e. values that satisfy the measurement conditions, are trended over time, wherein each trended sinus rate value is created based on recordings from at least one cardiac cycle. A preferred pacing therapy setting is determined to be the pacing therapy setting that provides a lowest sinus rate.