I used to do this as a kid. In my family everyone was watching a television at almost all times when we were home. Naturally it was there when we would go to bed.
I recognized this was a terrible pattern. I began shutting off the tv when I was going to bed. Eventually I moved the television out of my bedroom.
This is learned behavior and it can be unlearned. There's one simple solution to the problem posed in this article. Get the tv out of your room; it's not doing anything positive for you and I'm fairly certain you won't crave to have it back once it's gone.
As someone who used to regularly fall asleep to TV, it wasn't just a learned behavior. I have a very overactive mind without stimulus it tends to get to work, but with something like TV sitcoms I'm not particularly interested in my mind empties and lets me get into a sleep mode. Despite not having a TV in the bedroom for years I still have issues if I try to go lay in bed right away, so it may not be so simple for OP
What I've learned helps me is watching TV / listening to music while laying on the couch, and moving into the bedroom with a dim light once I feel myself drifting. Still, I often fall asleep next to the TV, but its better than tossing and turning half the time until I have to take melatonin to force my body to fall asleep
I recognized this was a terrible pattern. I began shutting off the tv when I was going to bed. Eventually I moved the television out of my bedroom.
This is learned behavior and it can be unlearned. There's one simple solution to the problem posed in this article. Get the tv out of your room; it's not doing anything positive for you and I'm fairly certain you won't crave to have it back once it's gone.