Research on automatic sleep staging based on EEG signals has a significant meaning for objective evaluation of sleep quality. An improved Hilbert-Huang transform method was applied to time-frequency analysis of non-stable EEG signals for the sleep staging in this paper. In order to settle the frequency overlapping problem of intrinsic mode function obtained from traditional HHT, wavelet package transform was introduced to bandwidth refinement of EEG before the empirical mode decomposition was conducted. This method improved the time-frequency resolution effectively. Then the intrinsic mode functions and their marginal spectrums would be calculated. Six common spectrum energies (or spectral energy ratios) were selected as characteristic parameters. Finally, a probabilistic nearest neighbor method for statistical pattern recognition was applied to optimal decision. The experiment data was from the Sleep-EDF database of MIT-BIH. The classification results showed that the automatic sleep staging decisions based on this method conformed roughly with the manual staging results and were better than those obtained from traditional HHT obviously. Therefore, the method in this paper could be applied to extract features of sleep stages and provided necessary dependence for automatic sleep staging.