It sure is frustrating, to have markedly different values and a markedly different approach to parenting than your step-child's mom. My husband has custody of his son from before and Mom lives acros the country. So, in a way it's nice (for me) that my step-son's exposed to our ways, the majority of the time. But it's still frustrating, when Mom does things so differently and you just have no control over it. You're in a position to feel like the kid's mother, but someone else actually is. There's no getting that pebble out of your shoe!
It's important to conciously distinguish between the issues that are really problematic and the ones that are largely trivial differences in personality and parenting style between you and the Mom. That's not to say you'll gain any control over the things that are truly problematic. But:
#1: You'll reduce the number of issues that make you sit and stew and resent the mother. That negative energy isn't good for you and the more of it you generate, the greater the chances the kid will be aware of it and the Mom. Part of the reason she "hates you" is because she senses that you disapprove of her so deeply and hold yourself above her. I'm not saying you're wrong! But how can one expect her to feel about you, considering what you think of her?
#2: If, in the future, you and your husband come to the conclusion that one of the significant issues - say, the exposure to Mom's sex life - requires action, like reducing her custodial rights, you'll make stronger arguments in court if you can stay focused on the important stuff. So, practice now.
Co-sleeping, for example, is common all over the world and plenty of people in this country do it, as well. The age when kids adjust to having their own bed varies wildly. Plenty of kids who grow up to be healthy, well-adjusted and secure were still sleeping in their parents' bed at 4-1/2. If he's still sleeping with his mom as he gets closer to puberty, some intervention would be warranted, but you're far from crossing that bridge. If you want him to sleep in his own bed at your house - where you do have control - that's fine and it sounds like you guys are working on it.
Ater a reasonable bedtime routine (kisses, tucking in, story), just one adult should sit in a chair and read to themselves or work on a laptop. Minimize interaction with him as he goes to sleep. If he keeps trying to engage you, ignore him for a few minutes, then - before he gets really upset - look up and smile and explain, "This is your time to go to sleep and my time to read. I don't mind doing my reading in here, if you want me to, but this isn't talking time. I'll talk to you about (whatever's on his mind) tomorrow." Repeat. Remain patient. As days pass, move the chair further and further from his bed until it's in the hall. Once you're in the hall, get up every once in a while and say, "I have to go check on Daddy/the dog/my tea kettle, but I'll be right back." At first, come right back. As days pass, stay gone longer periods until you're not so much sitting in the hall watching him go to sleep as doing other things in the house and checking on him from the hallway every once in a while.
He's only 4. You don't have to explain all your reasoning to him. He doesn't get to debate with you why your chair's further from his bed tonight. If he debates with you, he will think he has the power to change your mind. A simple, "This is where I want to sit tonight. The light's better for my reading. It's time for you to go to sleep," is plenty.
I'd also avoid all the, "Big boys sleep in their own beds," stuff. There's no need for you to plant the seed in his mind that what he does at his mother's home means he's treated like a baby there. It's enough to say, "At our house, we like kids to have their own beds. Isn't yours nice? Look what a handsome blue comforter you have. Isn't your pillow soft? I'd love that bed, if I were a kid!" No matter how much you disagree with the Mom, it's not good for him to think she's bad or that she doesn't parent him properly. If he comes to that conclusion on his own when he's older, so be it. Don't push him into thinking it - even inadvertently. If he thinks his mother's bad, he will think part of himself is bad. It's important to remember that. I have to remind myself of that a lot, too.
One woman in a house full of men: my soul mate:
... twin sons:
(HS seniors) ... step-son:
(a sophomore) ... our little man:
(a first grader) ... and there is another female in the house, after all