Do you know the feeling you get after a long run when you point your toes and tense your calf? It cramps! When you put a fatigued muscle in an over shortened position and force contraction you will get inefficiency of contraction and altered neuromuscular control patterns leading to cramps, or at least, that is the theory!
The action you are describing partially involves internal rotation of your hip. Your internal rotators are your tensor fasciae latae, gluteus medius and minimus (which are located in exactly the position you describe). You are putting these in a shortened position (hip internal rotation) which may be leading to the cramps.
I would try stretching (gluts, TFL etc.) however one of the most effective ways to lengthen gluteus minimus and TFL yourself will likely be self release (lying on a golf ball w/ a towel over it, or something similar). Are you doing any other activity which may be causing these muscles to over activate? If you always sit like this that might have done it anyway. I would try to avoid the position for a while if you can, lengthen your internal rotators complex in your hip (possibly see a massage therapist as well? or a physio for some release). Do you walk pigeon toed? or any other strange symptoms you can describe?
You could try strengthening your external rotators to limit excessive internal rotation as well.