Sometimes the Messenger of Allah ﷺ recited the Qur'an, and would pass by (recite) the verse of sajda and performed prostration and he did this along with us, but we were so crowded in his company that none of us could find a place for performing prostration. (and it was done on occasions) other than prayer.
رُبَّمَا قَرَأَ رَسُولُ اللَّهِ ﷺ الْقُرْآنَ فَيَمُرُّ بِالسَّجْدَةِ فَيَسْجُدُ بِنَا حَتَّى ازْدَحَمْنَا عِنْدَهُ حَتَّى مَا يَجِدُ أَحَدُنَا مَكَانًا لِيَسْجُدَ فِيهِ فِي غَيْرِ صَلاَةٍ