(CNN)When US Army veteran Patrick Skluzacek returned from Iraq in the mid-2000s, life was good -- every day was another welcome home party, he had a paid month off work, and he was finally back with family.
The son of an Iraq War veteran designed an app to stop his dad's PTSD nightmares
But then the nightmares started.
"I was scared of closing my eyes," Skluzacek told CNN. "They were just horrible, so vivid, I'd wake up thrashing and sweating. And Veterans Affairs didn't have a cure for it. They just had people with nightmares, people killing themselves, and they didn't understand why."
His son, Tyler Skluzacek, now 27, knew his father had changed.
"I was just 13 when he came back from Iraq, but I knew he was a completely different person," Tyler told CNN. "He used to be so active and happy. After the war he was just depressed, lethargic, irritable, and the worst part is he wasn't sleeping. It was hard seeing my Dad like that."
Suffering from post-traumatic stress disorder, his father had nightmares that haunted him for years.
So in 2015, Tyler created a smartwatch app that tracks, manages, and stops nightmares to help his father. He invented the application, now called NightWare, during his senior year at Macalester College.
The device received FDA clearance in November and works by using a person's heart rate and movement to detect when they are having a nightmare. It then emits gentle vibrations to pull them out of the nightmare without waking them up.
Tyler's father retired from the Army in 2012 as a sergeant first class after a 22-year career. In 2006, he served a tour in Iraq.
During the majority of his 12-month deployment, Patrick Skluzacek was a US Army convoy commander, managing fuel deliveries to Fallujah and Ramadi -- two strongholds of the Iraqi insurgency at the time.
Once he came home and the nightmares began, Patrick said, the only way he was able to sleep was by drinking alcohol before going to bed. Eventually that turned into mixing alcohol and pills, anything, he said, that wouldn't keep him up.
Trauma survivors often experience nightmares more frequently than the general population, according to the VA. Of people with PTSD, research shows that 71% to 96% of them may have nightmares, compared to 5% of the general public.
"I just kept drinking more and more. It got to the point where when I woke up from a nightmare at 3 a.m., I'd just have another drink. It caught up with me really fast," he said.
"I lost my job. And then I lost my wife, and then the alcohol got worse and I lost our home. I lost everything, really."
The nightmares lasted for nine years until his son was able to develop the app. Using his father as a guinea pig, Tyler tested out multiple prototypes of the app using an Android phone and a Pebble watch until he perfected it to the point where he says his father's nightmares stopped entirely.
"In that moment my entire life changed. It was literally night and day, all of a sudden, everything stopped. I was sleeping so much better," Patrick said. "My now wife tells me all the time, she'll feel me thrashing before hearing the watch buzz, and I'd go back to snoring. My appetite came back, I couldn't stop eating, so I gained back all the weight I lost from everything."
After years of fighting his dependence on alcohol and sleeping pills, struggling to return to his normal life, Patrick says he was finally at peace again.
"It was really heartwarming. My dad and I never had much in common, he was the big trucks and NASCAR guy and I was the dork who played violin," Tyler said. "But there are no words to describe the feeling to be able to help him in this way, so we became so much closer because of that. Helping someone that close to you is just an incredible thing to see."
In 2017, Tyler sold the rights to his traumatic nightmare monitoring and response algorithms to NightWare.
"My goal was saving my father, so mission accomplished. Now my goal is helping as many people as possible, but even if it just helps one person, it will all be worth it."
Today, the NightWare software is built into an Apple Watch -- the two together serve as a prescription-only medical device that has been clinically evaluated and cleared by the FDA, a NightWare spokesperson told CNN.
The watch is only intended for home use and during sleep. It is not intended to host any other consumer apps or be used outside the home.
When an individual is prescribed NightWare, they receive a kit -- an Apple Watch with NightWare installed and an iPhone companion device so patterns can be tracked over time and monitored by their physician.
The device, which is not available online, is currently for sale, with prioritized availability for veterans experiencing severe nightmares who have the most significant need. If prescribed by Veterans Affairs or a Department of Defense physician, the cost of the kit is covered for each individual.
"The company aims to ensure that most patients will have low to zero out-of-pocket costs, but costs will vary by insurer," the spokesman said. "NightWare is in the process of going through the VA and DoD's product evaluation and reimbursement process, with the hope of securing zero cost co-pay availability via multiple VA and DoD medical centers during the first and second quarters of 2021."
The company is also exploring the creation of patient assistance programs for qualifying individuals who are not covered under the VA or the Defense Department.