We describe a system for the evaluation of the sleep macrostructure on the basis of Emfit sensor foils placed into bed mattress and of advanced signal processing. The signals on which the analysis is based are heart-beat interval (HBI) and movement activity obtained from the bed sensor, the relevant features and parameters obtained through a time-variant autoregressive model (TVAM) used as feature extractor, and the classification obtained through a hidden Markov model (HMM). Parameters coming from the joint probability of the HBI features were used as input to a HMM, while movement features are used for wake period detection. A total of 18 recordings from healthy subjects, including also reference polysomnography, were used for the validation of the system. When compared to wake-nonrapid-eye-movement (NREM)-REM classification provided by experts, the described system achieved a total accuracy of 79+/-9% and a kappa index of 0.43+/-0.17 with only two HBI features and one movement parameter, and a total accuracy of 79+/-10% and a kappa index of 0.44+/-0.19 with three HBI features and one movement parameter. These results suggest that the combination of HBI and movement features could be a suitable alternative for sleep staging with the advantage of low cost and simplicity.