We used to brag about our all-nighters. Now deep slumber is a coveted state achieved with gadgets, apps, gizmos and classes