About a decade ago I had lots of nights when I either couldn't get to sleep untilwell after midnight or woke in the night and couldn't get back to sleep. Several times a month I wouldn't sleep at all so would go downstairs and read or do some research.
Gradually over the years I have got it under control. I go to bed about 10.30, if it is taking me awhile to get to sleep, I go into the spare bedroom where I can relax and read as long as I like without being worried I am disturbing DH. that usually gets me to sleep within 15 - 20 minutes
If I wake in the night and can feel I won't drift back quickly, again I go into the spare room with my radio, turn it on softly, tuck it under the pillow and usually drift off quite quickly. I do go to the loo in the night, but barely wake at all.
My rule is not to turn on lights during the night, so I move between bedroom and spare in the dark and between bedroom and loo in the dark and do not flush the loo overnight. That way I minimise my disturbance level.
Then of course there are nights like tonight when my brain is buzzing and I am not remotely tired, so I am at my desk and writing this post!