There are some products out there that attempt to measure sleep quality via leaving your phone on the bed, or wearing a bracelet. I'm not sure of the accuracy, though.
I hope these will get even better (maybe a non-intrusive headpiece that can measure brainwaves?) in the future.