Heart rate variability in normal and pathological sleep