I have nightmares due to CPTSD/PTSD. Several a night, every night, for years. There's a few medications for that if you can't take the first line Prazosin. Really wish I didn't need to do my own research then cite stuff to my psychiatrist.
Not my post but someone wrote a nice article explaining the recommendations from the American Academy of Sleep Medicine in 2018.
Medications That Can Help with Nightmares in PTSD - MH@H