Muhammad ibn Ahmad ibn Yahya from Ayyub ibn Nuh from one of our companions from Abu Abdillah عليه السلام:
Imam al-Sadiq عليه السلام said: “The naked person, who has no garment, if he finds a pit, he should enter it and perform his prostration and bowing in it.”
Ali Akbar al-Ghaffari
Tahdhīb al-Aḥkām fī Sharḥ al-Muqniʿah, vol. 3, p. 196