Sleep medicine specialists are aware of the US Food & Drug Administration approval of NightWare, which treats nightmares for patients with posttraumatic stress syndrome. Now NPR shares the origin story of how Tyler Skluzacek created the NightWare app to help his dad, who “lost everything” due to nightmares he experienced after military service in Iraq.

The idea, Tyler says, was to use technology to imitate something service dogs were already doing — recognizing a traumatic nightmare and then nudging or licking the person to disrupt the bad dream. He thought the smartwatch could do this with a gentle vibration.

The tricky part was to provide “just enough stimulus to pull them out of the deep REM cycle and allow the sleep to continue unaffected,” Tyler says.