As a lay person, i.e. I’m not a doctor, with similar issues, yes, you answered your own question that at night your anxiety is keeping you awake. For myself I’ve always had an underlying nervousness or maybe call it a tendency for an over excited reaction to events. There was a period in my life when I had full blown panic attacks but not any more. Perhaps a person like us gets hooked on it. We don’t want to let it go and so we take it to bed too.
Ways to overcome: it’s important to wind down before bed. Do something easy going for an hour or two before bed. For myself, if I continue doing little “tasks” until bed then I don’t sleep well. I have to turn off all my plans for a period before bed. I found watching a decent movie from a disc in the evening helps. No commercials. No internet. No chance to channel surf. A movie works because it’s extended time, a small investment, and the show isn’t my ideas its someone elses. Maybe if you like reading that could substitute for my movie. But if instead I shop on Amazon and worry about my shippers and what I should add to my “collections”, Or if I keep checking for family and friends’ text messages, then I take that stuff all to bed and it keeps me up. Or perhaps I’ve done those mentioned things all day long, along with stress at work, non-stop. It may almost be impossible for me to head that off. That stuff accumulates so don’t pack too much into the overall day either. Sometimes a walk doesn’t help because I mentally churn about things going on at work or with friends etc. Other ideas for that time of night for myself include not eating several hours before bed. Don’t drink at all. Might try one Benadryl at that time if you have allergies.
Suit yourself on what you pick. If it’s a book or movie it doesn’t have to be any kind in particular, just something unoffensive and at least slightly entertaining.