I think I'm fairly loose. It happens during downtime, your character stays pretty similar or else has a major character development that justifies it... and if it's the latter, it sets you back to the beginning of your previous level (or the equivalent).
Obviously, changing kith counts as a major change that requires major justification. Changing sex... I've never run into this. My first instinct is that changing sex is a big fucking whatever-- that weird mushroom you ate sure made a man out of you!-- but retconning sex is pretty iffy. On the other hand, I reckon someone who wants their character to have been the other sex all along... the more of a problem I think it's going to be for me, the more of a problem it is for them currently.
That's exactly as much thought as I'm willing to put into it unless and until it actually comes up in a game.
Has anyone ever stopped to consider whether or not elves can qualify for both male and female feats/PrCs?