There's nothing wrong with using masturbation as a way to fall asleep; be it when you're 14 or 24. As someone else has pointed out, be aware that it doesn't become a habit you find hard to break out of doing. The subconscious mind is very powerful, and will use whatever we feed it from your thoughts and feelings and beliefs to create your reality.
So if you have the idea - for example - that an energy drink will give you a buzz and boost your health, it'll do just that. However, as tests have shown, so does fake drinks when people are told they are energy drinks. In other words, your beliefs create your reality. IF you feel you cannot sleep without masturbating first, it becomes like a drug; you always have to have that hit in order to function. Instead of just pleasuring yourself for fun, then relaxing your mind, and going to sleep at ease. Waking refreshed in the morning or tired has to do with your body renewing itself overnight, healing, repairing and the myriad of other chores it does whilst you sleep. Not a w*ank session.