I find myself thinking about women and sex all of the time. I sometimes lay in bed for hours daydreaming about them. Sometimes I have no motivation to do other things. Any insights and ideas as to how to deal with this?
Do mindful meditation when you're in bed. So when you're laying there be mentally aware of your body, like "these are my toes. This is my pinky toe. This is the next toe over (I don't know what to call that toe), and work your way up to your head. Put all of your focus into this and if you get a fantasy in your head, snap out of it and think about your body parts again. Distractions become less frequent over time.
What J247 described is the classic way for meditating. In my case, I have a mind that races and jumps, so the only thing that worked was to "signal jam" by flooding it with fast repetition. Because I'm religious, I recite meditative memorized prayers, but you can use anything - recite verses of a song, catch phrases, the Fibonacci sequence. J247's is great, try it. But if it doesn't work, keep trying other things until you get what you need.