Talk to your doctor, there are many things you can do from habitual changes, to dietary changes to medications if needed.
I've not gotten a good night's sleep in over a decade. Last night, I saw the clock at 1am, 3:30am (when I was up with my 4 year-old to go to the bathroom), 5am, 5:45am and every 10 minutes after the 6am hour until I finally had to get up for work before 6:30.
Caution: the jury's out on melatonin. Even though you can purchase it anywhere, the products are NOT FDA approved, and I'd strongly suggest a discussion with your MD/pharmacist before starting. The medical basis is to replace the melatonin hormone to help regulate your circadian rhythms.
In my case, I can't shut my mind off. I do take a medication for it which I'll likely have to remain on long-term because it's a chronic problem for me.
FYI - the active ingredient in Benadryl, diphenhydramine, is the same ingredient in products such as Tylenol/Advil PM, Unisom, etc. It's considered safe and may help as occasionally needed.
Hope you get a good night's sleep.