I have had ringing in my ears since I was a kid. From chronic ear infections to fighting to race cars, hearing loss has caused a lot of it.
Almost without exception, I fall asleep with ear buds in my ears listenting to an e-book or an ambient fan. Sometimes it's the TV, but something must always be on.
The insomnia was terrible for me. I still get it off and on. Exercise, and very little caffeine help a lot. I also take benedryl or unisom when I can't sleep. That helps a lot.