Sometimes you wake up and you feel drained. It’s like you never slept at all. Right now, in Las Vegas at the Consumer Electronics Show, I know the feeling.

Gear4 might have a solution with its Sleep Clock, which uses an iPhone app, a dock, and radar (!) to sense your sleep pattern and wake you up at the moment when you’re at the lightest point in your sleep cycle.

The Raleigh, N.C. company has made an app and sleep monitor hardware that uses sensors to detect, track, and interpret your sleep patterns. Once it develops a profile of your sleep habits, it can then make recommendations, said Victor Marks, senior market development manager at the company, in an interview.

Gear4 is known as a maker of accessories for mobile devices. Its new Sleep Clock is a dock for your iPhone that works together with an app on the phone. Aside from showing the time, the Sleep Clock uses a doppler radar to sense your body’s breathing and movements. If you wake up in the middle of the night and turn over, the Sleep Clock records that, too.

The next morning, you may not remember that moment, but it may tell you that you were restless. On the iPhone, you can look at your entire sleep pattern, including how long it took you to fall asleep and how many minutes exactly you slept. It can show you how much of your sleep was deep and how much was not as restful.

The Sleep Clock fits into a wave of new products related to research on “the Quantified Self,” where researchers measure every possible thing they can about a person in the hopes of gaining larger insights. A slew of products, such as the Fitbit and Striiv pedometers, Jawbone’s Up and Lark’s sleep monitor/alarm, are aimed at making it easier for people to measure themselves in order to get healthier and sleep better.

The app is free, but the Sleep Clock sells for $199. It will go on sale soon. We caught up with Marks at the Showstoppers party in Las Vegas on Tuesday. See our video interview with Marks below.