Desynchrony and synchronisation underpinning sleep–wake cycles