It is narrated from Sayyidah Hafsah bint Umar (may Allah be pleased with her) that one day the Messenger of Allah (peace and blessings be upon him) came to me, and he had placed his garment between his thighs.
It is possible that he (peace and blessings be upon him) had taken hold of one edge of his garment and placed it between his thighs, for nothing else is to be supposed of him; and in this way it is the knees that may be uncovered, not the thighs.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3245