Sahih Muslim 5503
The Book of Clothes and Adornment
وَحَدَّثَنِي إِسْحَاقُ بْنُ مَنْصُورٍ، أَخْبَرَنَا رَوْحُ بْنُ عُبَادَةَ، حَدَّثَنِي عُبَيْدُ اللَّهِ، - يَعْنِي ابْنَ الأَخْنَسِ - عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " لاَ يَسْتَلْقِيَنَّ أَحَدُكُمْ ثُمَّ يَضَعُ إِحْدَى رِجْلَيْهِ عَلَى الأُخْرَى " .
Jalbir b. Abdullah reported Allah's Messenger (ﷺ) as saying:None of you should lie on his back and place one of his feet upon the other
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.