Patrick would wake up every night around 3 a.m. as if someone had shocked him with a jolt of electricity. His heart would beat too fast. He would sweat. He would be so awake that it would be hard to get back to sleep. The nighttime panic attacks prevented Patrick from feeling good the next day. He did not do well at work, because he was so tired. “It was a bad, bad phase in my life. Really bad,” Patrick said. Almost 10 years later, Tyler was in a position to help his father. He was about to graduate from a college in Minnesota. Tyler was studying math and computer science. He thought he could make a computer program that might help his father. So he entered a competition in Washington, D.C. He and three other students worked together to solve the problem Tyler’s father, and other U.S. war veterans, were having. People called them “night terrors.” The students had 36 hours to come up with a program. They called it myBivy. That name comes from bivouac, a military term for a safe place to sleep. The application uses a smart watch and a smart phone together. The watch tracks the wearer’s heartbeat. It sends the data to the program on the smart phone.