I used to stretch my legs towards the Qibla of the Prophet (ﷺ) while he was praying; whenever he prostrated he touched me, and I would withdraw my legs, and whenever he stood up, I would restretch my legs.
Sahih al-Bukhari Book 21, Hadith 13