The good way to get rid of insomnia is to get some prescription sleeping pills.
That's the worst way.
It will solve your problem temporary and on top of that you might get addicted to those pills.
Just start exercising or do not use your mobile phone - laptop before you go to sleep. There are physical ways to solve it and not getting pills.