A simple method for the quantitative description of sleep microstructure