If at all possible talk with the other parents about the need for consistency because of her negative behavior when she's back with you. Be willing to compromise about some ways of doing things. Praise them first. It's good that they are taking her for those days. I know it doesn't feel that way for you. It does make life more complicated. However, it is important for her to know her father now that she knows him. You can't go back to the time she didn't know him.
When talking with them use I statements. Be careful to not accuse them of poor parenting. Acknowledge that it's inevitable that things will be different at each home and you'd like to co-operate on parts of it that you can both agree on.
You cannot control what happens at their house. I wholeheartedly agree that now is the time to teach her that different homes have different rules. These are the rules here and her are the consequences. At two she won't learn so much from conversation as she will from consistent reinforcement of the rules. Enforce bedtime in a firm but pleasant manner every time. She'll learn.
But sleeping in her bed may be something the father and step-mother may be willing to do if they know how difficult it is for her when she returns.
About wanting to get everything her way. That's a common way to find reassurance that she is loved. For my foster daughter, who was 7, her behavior was also influenced by her anger at having to go back and forth. I suggest that you do give her lots of attention. It might help to have a welcome back routine that you do every time. It will help if you can ignore her demands and whining. Be sure to not take it personally.
It might help to talk about feelings and ask her how she's feeling. Then help her deal with the feelings. She may be too young for this. It does seem like my grandchildren had a board book about feelings at that age and were beginning to be aware of the basic feelings of happy, sad, mad. Be careful to not tell her how she feels. Describe each feeling and ask her to tell you about a time she felt after you describe each one.
Tell her it's OK to feel however she feels. If she says she's sad, be sympathetic. If she says she's mad, show her how to hit a pillow while saying, "I'm mad." Happy? then dance around and laugh together.
It's OK to say she hates you. All kids say that when they don't get what they want. Ignore it. You know it won't be long that she's loving again. If you pay attention to it, she will learn that she can manipulate you by saying it. Even if she doesn't get what she wants, if you get angry she is influencing you and she wins.
Swearing is not acceptable and there should be a consequence.
In my daughter's family nearly everything has the same consequence. Go to your room. When she swears she's not good company so she goes to her room or you walk out of the room. When she swears she's wanting to get a reaction from you. Negative attention (you getting upset) is better than no attention.
If she's too obnoxious to be comfortable around when she returns I suggest that quiet time by herself might be helpful. Place some pillows and a music player in her room so that she can settle down, look at books, play with toys or watch a short favorite video. Along this same line she might respond to being held.
You could also plan a quiet group activity for her that places her in charge. She can choose a video or a game. She can choose what to have for dinner and help fix it. The more choices you can give her the easier it will be for her to relinquish the control she felt at the other home.