A method of adapting the boundaries when extracting the spectral features from heart rate variability (HRV) for sleep and wake classification is described. HRV series can be derived from electrocardiogram (ECG) signals obtained from single-night polysomnography (PSG) recordings. Conventionally, the HRV spectral features are extracted from the spectrum of an HRV series with fixed boundaries specifying bands of very low frequency (VLF), low frequency (LF), and high frequency (HF). However, because they are fixed, they may fail to accurately reflect certain aspects of autonomic nervous activity which in turn may limit their discriminative power, e.g. in sleep and wake classification. This is in part related to the fact that the sympathetic ton...