The percentage of time in observed deep sleep and quiet sleep was correlated with both percentage sleep efficiency ( r = 0.78 ) and fewer state shifts per hour ( r = -0.65 ) from electroencephalogram ( EEG ) .