I suffered from severe insomnia & pains for 3 years (I watered my bathroom too much at night also) . But luckily, I encountered some methods by chance and now I could sleep in less than 3 mins everyday (except sometimes I feel frustrated and took my bedtime for thinking...)
1- Practice breathing technique from the tape of Dr.Weil "Breathing: The Master Key to Self Healing" . It helped me never wake up in middle of night coz it calmed down my nerve. ( Generally, the theory in the tape is you should slow your breath by counting , another way is tongue touching upper teeth...). Be patient thou.
2- You should not sleep too early, you should read , read and read until you can't read anymore (even though tomorrow you have to go to work early, you still have to work hard until late night). I wish I knew this dump so simple thing so that I didn't lose my 3 years in tears. I used to worry for my early school time and tried to sleep at 10 pm but never got a min.
3- I overcame my physical and mental pains by using the distraction technique, I tried to recite engineering lecture in my head (it should be imagination & forming a mental picture such as imagining an atom , there are big protons + neutrons in the nucleus and electron cloud around, electrons are tiny particles, then two atoms share electrons...) Note that it should be mental imagination but not inner voice reciting in your head. And be patient with this practice, if you your thoughts stray, put it back to the lecture. When you totally in the lecture, your brain wave will shift to a delta state , and you will wake up in the next morning. I could never feel a pain coz I sleep to fast by practicing. (I used to be shy when I was young and can't pee in public places where lot of people around, but when growing up , I found out the distraction method which I was thinking about sth else while I doing the stuff...). So should find out a distraction from anxiety of sleeplessness.
4- Every method will be trash , if you feel anxious. A trick for anxiety is you should reverse your thought, now you should think that your purpose is to stay late at night to study sth helpful for society and yourself but not to sleep. You should say to yourself that sleep is a waste of time, and you want to stay as late as possible to do much imagination study but not to sleep.
5- Youtube has some nice hypnotic sessions and those are very helpful for some sleepless people though.
Have a nice health.