It has been observed that heart rate variability (HRV) diminishes during anesthesia, but the exact mechanisms causing it are not completely understood. The aim of this paper was to study the dynamics of HRV during low dose propofol (N=9) and dexmedetomidine (N=8) anesthesia by using state-of-the-art time-varying methods, and thereby ultimately try to improve the safety of anesthesia. The time-varying spectrum is estimated by using a Kalman smoother approach. The results show that there is an overall increase in HRV and decrease in heart rate prior to loss of consciousness. For dexmedetomidine these changes are more considerable than for propofol. For dexmedetomidine the variability also seems to start decreasing right after loss of consciousness, whereas for propofol HRV continues increasing.