Therapy and groups really helped my nightly flashbacks that surfaced when I slept.
I slept well until memories started to pop, once I started to approach sex. After having sex, then they came on full bore. Nightly, flashbacks, waking up crying, not being able to breath, feeling diembodied and afraid to go to sleep. As I chipped away at processing the trauma, the nightmares revealed more layers, and gradually settled down, over a decade.
Now, as I'm engaged in the world- get triggered, sleep is a challenge. I work on winding down my flight or fight response before sleeping; take hot showers, no TV, no phone calls, do meditation, poetry helps, etc. If I don't get good sleep, I'll use a medication, since lack of sleep increases my depression.