An integrative analysis to sleep functions