Insomnia is a common condition. I have seen estimates that over half of all adults experience difficulties sleeping a few nights per week or more. I am not a doctor or expert on health issues but I have found something which helps me get to sleep at night: BDSM! There are two ways I have found that BDSM helps me fall asleep at night.
1) As a teenager, I learned that I was a submissive and would try to find time to mentally explore my submissive fantasies. I found that the best time for this was the quiet time just after I went to bed and before I fell asleep. A bit later in life as stresses of school and work began to creep into my thoughts at night I found that weaving a mental fantasy of submission was not only enjoyable but helped get my mind off the troubles of the day and helped me fall asleep. Almost every day of my adult life I have weaved a submissive fantasy and rarely do I have trouble falling asleep.
There are times when work or other stresses make it difficult for me to relax when I lie down at night and sometimes it takes me a few minutes before I am able to think of a good submissive fantasy. Once I do think of a fantasy, though, sleep is usually not far behind. The only downside is that my enjoyable submissive fantasies do not last long before I fall asleep. Often I will continue a fantasy the next night if it is one which is good enough for me to remember.
Another benefit to thinking of fantasies almost every night is now that I have recently begun to write fictional short stories on my site, I've had no shortage of ideas for new stories.
2) One common cause of insomnia is not getting enough exercise during the day. A remedy for that is ... to exercise more (something I am trying to work on). Also, I have found that the adrenaline produced from a session of BDSM, consensual moderate torture, an hour or two before bedtime tires me out and I usually fall asleep quickly once I go to bed. I am lucky that I do not need to ask my dominant wife for a session of torture but for those who are uncertain about whether they would like more, try thinking of it as being "for sleep purposes"!
I have read that it is not advisable to exercise within a few hours of going to bed so that may also apply to a session of pain. If you find that a session of pain an hour or two before bedtime still leaves your heart racing too fast by the time you go to bed, try the session earlier next time.
As a reminder, I am in no way giving medical advice so please exercise caution. I only comment on what works for me.