Alright I feel like putting down my whole theory about what has happened to Sanji since a lot of people don't seem to be seeing it. Note that I have not read through all the pages in this topic so I will probably just end up stating things other people have said before.
The first clue to what has happened to him shows up at around 6:45 of the funimation dub episode. The err… queen states "lets use the traditional method of Kamabakka Kingdom for the first time in a long while" to deal with Sanji. This method does not sound like a normal way of converting someone into an Okama. Next when Sanji is fighting the queen during the first part of the fight his personality is exactly the same as always. From when he wears the dress and tells everyone to shut up calling him cute to his fierce attacks. Then comes the second clue, at around 11:26 of the funi dub Sanji remarks, "...whats up with his eyes?" He then freaks out that the okama is checking him out but I don't believe that's the case. It is right after that comment that Sanji starts to act outside of his personality. He all of a sudden starts acting embarrassed which is odd since just a moment before he didn't give a reaction besides anger that he was being leered at by the crowd and being called cute. The fight continues until the sub queen uses an attack called "Awakening of the Inner Maiden" which doesn't consist of an attack but just holding the enemy. Here is where Sanji really changes out of the blue, the Okama isn't doing anything but hold him but his mind seems to be completely slipping away. At the very end he remarks that he is, "about (to) lose myself and become someone else." Then when we look at the last scene with him running with the other Okama take note of 14:01 in the funi dub. His face itself seems to be in pain. From his squinted eyes to the vein of tension on his forehead.
The ONLY thing we can take from all this is that Sanji's mind is being controlled by the sub Okama queen. From the evidence shown from the fight and the aftermath it is obvious that the queen has attacked and warped his very mind. This is NOT his free will people!
But how did the sub queen do it? Obviously the easiest answers are to say he used a devil fruit or Haki. I personally believe it was a Haki ability. We still don't understand what Haki is but we do have some ideas of what it can do. It has been shown to damage logia users, repel attacks, read minds to know upcoming attacks, and knock a person out who doesn't have a strong enough mind. Now since Haki HAS been shown to use abilities that deal with the mind such as reading it, I think it is a fair bet that certain Haki users might be able to manipulate and take over the minds of people who don't know how to defend against it.
Anyway that's all I have to say. I apologize for all the text and I am sure others have posted a lot of this before. But anyway lastly from what is shown I can guarantee that since this is mind control Sanji will end up turning back to his original self once it is broken. Furthermore, since it is mind control no one should be thinking less of Sanji's character it could have happened to anyone. So people should stop crying over this.