As I have read from the others and I agree that there are many methods on how to fall asleep...
I agree that with siting at computer or staring in your smartphone is not healthy before you go to bed. But, we are living in era where we use the Internet Technology most of our day. So, if some one is texting you before you go to bed, I am sure that you will not ignore him/her!
Besides meditations (who is the best thing to do before you go to bed) there are other methods that you can practice. Listening a lounge or ambient music before you go to bed is a very healthy way to fall asleep. But, keep in mind to listen only the music, not to stare in your PC and doing some other things in the same time!