Remember the scene from Saving Private Ryan? The trick to falling asleep is trying to stay awake. Let me explain...
When you are on the couch you are not trying to go to sleep, so you can drift off effortlessly because you are not thinking about going to sleep. It sneaks up on you and catches your conscious, thinking mind unaware.
When you get ready for bed and get in bed, you are focused one thing: going to sleep. And of course being aware that you need to go to sleep makes it impossible to turn your brain off since your conscious mind is intensely aware of the fact that it is time to fall asleep. There is no way for sleep to sneak up on you. And the more you cannot fall asleep the more anxiety you have about not being able to fall asleep and the fact that you will be too tired in the morning because you did not sleep enough. It is a negative feedback spiral that feeds upon itself.
I have not magic wand to fix this. I try to not stress out over not falling asleep, because I feel like it feeds the spiral, but I also have trouble turning my brain off. The one thing I do that I think helps a little bit is not to think about real-world events or problems. I try inventing fictional stories with imaginary characters. This helps avoid stress related to real-world problems I have. It helps a little bit.