Objective:To estimate the sleep quality.Methods:The EEG complexity in different sleep stages is studied.The results indicate that the deeper the sleep,the smaller the EEG complexity of who le cortex.Based on the EEG complexity and the sleep multigraph,all-night sleep -stage scoring is performed.Then several parameters(sleep period,shallow sleep period,deep sleep period,REM period,ratio of the wakeful period and sleep one)ar e defined to estimate the sleep quality.Results:The experiments reveal that the estimated sleep condition wa s the same as the subject′s impression.Six all-night sleep show that our study provide a way to estimate the sleep quality.Conclusion:Auto sleep staging and the sleep parameters can be used t o estimate the sleep quality.