Nightmares, are a common thing. Especially when the wounds are still fresh. Here are the couple of ways I helped deal with them.
First off, is the pre-sleep ritual. No video games, no war movies, nothing super mentally engaging before attempting to go to sleep. Alcohol may knock you out fast but it contributes to nightmares because it prevents deep sleep. I try to wind down before crashing for the night. Best case scenario I will start an hour out, watch a little TV, then go through the night time stuff, brush my teeth then hit the sack and read a book. Then try to sleep.
If your like me, as soon as you close your eyes and start to sleep, your mind will find its way back to the machine gun fire or being in the army in general. Force yourself awake a few deep breathes and focus on something entirely different, and attempt to sleep again.
If you do have nightmares, keep a journal bedside. Wake up from it, jam it into the notebook while it is fresh then try to go back to sleep again. When you get up the next morning review the journal. Try to put your finger on what it is that is bugging you based on the running theme of the dream.
Some get medication, some self-medicate, this is what I found works best for me. The same should probably go for you. If you have over come the nightmares post it up share your view. If you are still working on it, share the dreams. There are common themes in alot of vet nightmares.... Mine is zombies, my guys get killed they turn into zombies and come after me, reflects that, I feel guilty for what happened to them. What do you think yours mean?