Apple has introduced NightWare, a solution for nightmare-induced insomnia.

Patients with nightmare disorder or nightmares caused by post-traumatic stress disorder (PTSD) are given the digital therapy system NightWare to help them get a better night’s sleep.

Prescription digital treatment is the first and only option for people over the age of 22 who have nightmare disorder or PTSD-related nightmares.

Read also: Europe’s New Phone Charger Policy Forces Apple to Adapt

How Apple’s Nightware operates

NightWare measures a person’s stress index (the amount of sleep disturbance) by using artificial intelligence and other cutting-edge, smart technology. It uses information from the heart rate sensor, accelerometer, and gyroscope on the Apple Watch to track nightmares in real time.

The technology sends short vibrations quickly to stop nightmares without waking up the patient.

The vibrations in the wrist intensify until they awaken the user from the nightmare but not from sleep. NightWare’s first-of-its-kind tech platform changes the vibrations’ strength and frequency based on what the user needs at the moment.

As NightWare becomes more intelligent with use, increasing usage results in higher learning. NightWare constantly collects information from the user and adapts to the patient’s changing sleep patterns to create a personalized intervention based on the growing amount of information from the user.

Apple Begins Ads Display in App Store

About NightWare

Tyler Skluzacek, who was studying computer science at Macalester College in Minnesota, made the first version of NightWare. His father, who had PTSD after serving in the military for 20 years, gave him the idea to make a treatment for it. The idea was inspired by the way a service dog gently prods its owner to end a nightmare.

Skluzacek met NightWare CEO Grady Hannah shortly after creating the prototype. Hannah acknowledges Apple’s ecosystem for helping her launch NightWare after seven years. Hannah said they needed an independent security audit and FDA approval. NightWare runs on iPhone and Apple Watch, so I assume their quality and security helped acquire that clearance. “NightWare must work well for so many individuals who have given so much.”

NightWare is currently given to 400 people in the US, and 98 percent of them are in the military or have been in the military.