(CNN) A bomb rips through the Humvee in the road ahead, sending it flying into the air. The pop of gunfire is everywhere.

The man next to you -- your best pal in this godforsaken place -- suddenly slumps over. Screams and dense smoke fill the air.

It's the stuff nightmares are made of, and all too real most nights for many returning veterans.

"Six to eight months after I got home, the nightmares really started to come in," said Army Reserve veteran Aaron. "Middle of the night, all of a sudden I'm back in Iraq, full battle mentality, running, chasing people down."

Aaron is one of many soldiers identified by their first names who shared their stories on video on Make the Connection , a US Department of Veterans Affairs website devoted to returning veterans.

"I was having to sleep on the front porch, I couldn't even sleep in my wife's bed," added Mike, who served in Iraq for the Army Reserve and National Guard. "When I slept in her bed, I'd wake up every 30 minutes with nightmares that someone had come into the house and were harming my family, my kids."

"Over half all veterans have nightmares," said psychologist David Cooper, who works with traumatized veterans at the Department of Defense National Center for Telehealth and Technology . "It's a common symptom that comes along with PTSD, or post-traumatic stress syndrome."

But it's not just veterans who struggle with nightmares. The American Sleep Association estimates between 80% and 90% of us have disturbing dreams at night.

The dark side of nightmares

For most of us, nightmares occur when we are stressed and worried, or when we've experienced an upsetting event. Nightmares tend to stay with us longer if they are fear-based, but studies show confusion, guilt, disgust and sadness are the most common triggers.

It's not just feelings. Late-night snacks, some medications, and even the withdrawal of medications or alcohol can trigger repugnant dreams.

Science says these types of dreams may actually be good for our psyche. Instead of living with vague feelings of unease, the brain, usually during the REM stage of sleep, consolidates our bad feelings into a concrete memory that we can then process, file away, and forget.

But for the unlucky among us, nightmares can become chronic, and turn into a disorder that rips apart sleep and destroys productive lives.

"I started having a lot of trouble sleeping, sleeping for two, three hours a week," said US Army veteran Bryan in a Make the Connection video. Bryan served several tours in Iraq. "I just couldn't sleep through the whole night."

"They start avoiding sleep for fear of the nightmares," said neuropsychologist William Kerst. He worked with soldiers with PTSD and nightmares while in the Air Force and now counsels vets in his private practice in Alaska.

"And chronic sleep deprivation is associated with lots of bad things," Kerst continued. "Obviously their attention, concentration and memory are going to suffer ... depression risk, it goes way up ... there's even lots of studies to show a really clear link between chronic sleep deprivation and suicidal thoughts."

It can happen to any of us

You don't have to be a veteran to have PTSD and the accompanying nightmares. Anyone who has suffered or witnessed major trauma, such as natural disasters, domestic violence, rape, terrorism, even a terrifying car accident, can develop ongoing, frightening memories of the event. The National Center for PTSD estimates 10 out of every 100 women and four of every 100 men will develop PTSD at some point in their lives, and as a result, may suffer nightmares.

And here's the really nightmarish thing. Even if the PTSD is addressed and overcome, studies show the gut-wrenching dreams may not go away.

"The tendency for these individuals to have trauma related nightmares and then sleep disruption and sleep disturbances continued well after successful PTSD treatment was complete," said Kerst.

The reason why may lie in how PTSD and nightmares are treated.

"When I'm working with a patient with PTSD one of the things I want them to do is expose themselves to those traumatic feelings over and over again so that their body learns to calm down and not react as much," said Cooper. "But traumatic nightmares are not treated the same way as other PTSD symptoms. Instead we give something new for the brain to focus on which eventually reduces the overall frequency of the nightmares."

The approach is called Imagery rehearsal therapy or IRT. The goal of this type of therapy isn't to relieve or process the trauma in your nightmare. Instead you want to change it -- tweak it, really -- so the nightmare loses its power over your mind and your sleep.

"Let's say I'm working with someone who has a nightmare about going on patrol in Afghanistan where their Humvee was blown up by an IED," said Cooper. "I may want to have them change that explosion to confetti, or a balloon popping."

"Or instead of an IED on the road," Cooper continued, "maybe it's a grocery bag that the Humvee hits, something that is not going to elicit the same emotional response, but still remains true to a majority of the dream."

Developed in the 1990s by Dr. Barry Krakow at the University of New Mexico School of Medicine, Imagery rehearsal therapy has shown some impressive results in studies. Besides limiting chronic nightmares and improving sleep quality in over 70% of the subjects, IRT has been shown to decrease PTSD severity , as well as reducing symptoms of anxiety and depression.

Other research found the effects of IRT on nightmares can be long lasting , especially if the rewritten dream removes violent details

How IRT works

Imagery rehearsal therapy works by having the patient write down specifics about the nightmare, creating almost a movie-like script of the disturbing dream. Then, in conjunction with a therapist, the patient rewrites the nightmare to make it less disturbing. Then they are told to practice the re-scripted dream during the day.

The good news is that it doesn't take long for the positive benefits of IRT to take place, for both those with PTSD and more common nightmares.

"It's usually only a couple of sessions, maybe four," said Cooper, "and we ask that folks rehearse the new dream one or two times throughout the day for 20, 30 minutes. That's really all the actual work that it takes."

In fact, one of the most time-consuming parts of the process, said Kerst, is the writing process. That's why he was excited to partner with Cooper and the National Center for Telehealth and Technology to develop an app called Dream Ez . While it can be used on its own, Kerst and Cooper say it will be most effective with an IRT-trained therapist.

"You wake up, you grab your phone, you record your nightmare," said Kerst. "Then you rate how distressing or disturbing the nightmare was, and with the help of your therapist turn the dream away from the distressing turn of events."

The app allows users to audio record the re-scripting of the dream, and then encourages them to practice the reworked dream, while also providing some relaxation tools to foster better quality sleep.

The app is currently being evaluated by various sleep clinicians.

Join the conversation See the latest news and share your comments with CNN Health on Facebook and Twitter.

"We know IRT works, so we're not studying that," explained Cooper. "But we want to know if making the process more user friendly will help people stick with it longer, so they get the full effect of something that we already know works."

One of the biggest pluses for IRT is the avoidance of prescription sleep aids, which often cause drowsiness, lethargy, and in some cases, are dangerously addictive. It's also helpful for veterans or others who refuse to be treated for PSTD or other disorders, perhaps because of stigma or personal pride.

"A lot of people are willing to say I want to get rid of my nightmares and sleep better," Kerst explains. "So even when people don't want to talk about their trauma specifically, they're willing to say that and they begin to get the help they need."