What’s the best way to help with sleep and constant nightmares?

Lately, I have only been able to sleep for 30 min to an hour at a time… and most of them are from loooooooong nightmares. Not even scary ghost ones, but truly realistic real life situation types. I wake up confused, not knowing what I dreamt was real or not and where I am.

The past year I finally re-tried taking melatonin to help with the sleep but I find it helping less and less… yes I may sleep, but what feels like hours, I wake up a mere hour later… tired and distressed. I feel like calming music doesn’t help me anymore either…

I’m lost in my own rabbit hole… except I have no Wonderland.