First of all, let me clear up one thing: I don't tell my man he's "not allowed" to do something. If you took that from my comments, that's a wrong take.
Secondly, you may not have mocked religion here and I appreciate that. But others do and have gotten quite vicious in their mockery.
I will share two things that are a big part of my thinking.
1. God is all about relationship. He created man(kind) to be in relationship with him. He created woman to be in relationship with man. And he created sex not just for procreation (and not for recreation outside of marriage) but to create intimacy between a man and his wife. Sex, according to God, isn't even something to be indulged in outside of marriage. Masturbation (self pleasure) doesn't promote intimacy, but can cause alienation when one has a willing partner, yet chooses to get his/her needs met by masturbation. I'm not saying it's wrong to masturbate when you're married, but considering God's purpose for sex is intimacy and oneness, masturbation doesn't promote either. That's why I say if you need that release to relax and sleep, ask your partner to be a part of it even if it's just watching. Or I might lay behind my man with my arms around him while he does it. I don't need to interfere. If your partner doesn't care that you masturbate to fall asleep, then that's a win for you. But I'm not necessarily wrong because I would like to share that with him. It's not just a bodily function to me and it's not comparable to making a sandwich when you're hungry.
Read I Corinthians 7:1-6, paying attention to verse 4.
2. Since sex is designed to create intimacy and should be about your partner's pleasure as well as your own, masturbation figures heavily in the picture when you're single. You don't have that partner. But when you do, the idea is that one no longer needs to pleasure him/herself.