It’s the middle of the night. You toss and turn, frustrated by your brain’s refusal to stop chattering and the distracting lights and noises around you. A few restless hours later, you have to get up and face the day feeling foggy and sluggish. When extreme grogginess becomes a part of your daily routine, you can start to go a little crazy. We spend up to a third of our lives sleeping, but most of us have no idea how much quality sleep we’re really getting — or how to get more of it. Luckily, a new dream-enhancing wearable device will soon be helping people take control of their sleep cycles, get a better night’s rest, and boost their daytime productivity.

The Neuroon Open sleep mask uses a set of built-in sensors to collect data throughout the night, documenting how much time your brain spends emitting alpha, beta, theta, and delta waves. The mask also monitors your heart rate, blood oxygen level, skin temperature, and movement. The system processes this information and converts into an easy-to-read set of sleep analytics, which tells you exactly how much deep, light, and REM sleep you got. If you aren’t using those eight hours as efficiently as you could be, the Neuroon Open will even give you some helpful tips on how to improve your nightly habits.

The mask’s Kickstarter page explains, “After each sleep you will be given a short test in which you estimate your sleep quality and sleepiness after waking on VAS. This self-evaluation system records changes in the subjective reception of your sleep. This is then combined with metabolic and sleep-staging data in order to provide information about the best sleep pattern to suit you.”

“As a voluntary extra option, you will have the possibility to try two short games which measure your mental capacities after sleep. The working memory test will check your perception and working memory condition upon waking. The cognition test will check your cognitive capability. During the first ten days, Neuroon Open will gather data from the tests to personalize its analytic software. After this period, you will be informed about your daily results compared to the average, allowing you to choose the best sleep pattern for your top mental condition.”

To see your “sleep score,” simply put on the mask when you go to bed and check the accompanying smartphone app in the morning. If you’re not a big fan of traditional alarms, you can instruct the Neuroon Open to simulate the light of a natural sunrise when it’s time to wake up. Heavy sleepers needn’t worry, either. Anyone who isn’t awoken by the mask’s lights will be greeted by a set of gentle vibrations and a final audio alert from their phone. The best part is, the Neuroon Open lets you choose which stage of sleep you’d prefer to wake up from, meaning you’ll never have to interrupt you deepest slumbers again!

It’s easy to confuse this gadget for something out of a science fiction movie, but we assure you that the Neuroon Open is the real deal. The mask can also be programmed to emit a series of lights, sounds, and vibrations that help induce lucid dreaming, a metacognitive state in which a person realizes that they’re asleep and is able to control what happens in their dream. If that sounds a little too intense for you, use the mask to guide you through a few mindfulness meditation sessions instead.

The most sci-fi element of them all? Probably the fact that you can connect the Neuroon Open to your smart home system to control your house as you sleep. Set it to automatically turn your bedroom or bathroom lights on if you wake up in the middle of the night, or have the mask lower the temperature when you enter REM sleep.

The Neuroon Open was designed using open-source code, which allows anyone to access it and take a closer look at its inner workings. If you’re particularly tech-savvy, you can even program your own applets for it! The mask is being funded on Kickstarter until July 27th, so be sure to order one for the early bird price of $139 while you still can.