The Prophet ﷺ and his companions remained for three days digging the trench without tasting any food. They said, "Messenger of Allah, there is a hard rocky outcrop here in the mountain."The Messenger of Allah ﷺ said, "Sprinkle water on it."So they sprinkled water on it. Then the Prophet ﷺ came and took the pickaxe, or the shovel, and said, "In the name of Allah." He struck it three times, and it turned into a heap of soft sand that could be scooped up.Jabir said, "I happened to glance over, and there was the Messenger of Allah ﷺ with a stone tied against his stomach."
حدثنا وكيع حدثنا عبد الواحد بن أيمن عن أبيه
مكث النبي ﷺ وأصحابه وهم يحفرون الخندق ثلاثا لم يذوقوا طعاما فقالوا يا رسول الله إن هاهنا كدية من الجبل فقال رسول الله ﷺ رشوها بالماء فرشوها ثم جاء النبي ﷺ فأخذ المعول أو المسحاة ثم قال بسم الله فضرب ثلاثا فصارت كثيبا يهال قال جابر فحانت مني التفاتة فإذا رسول الله ﷺ قد شد على بطنه حجرا
No references are available.
Its isnad is sahih, and the hadith appears at length in Bukhari, 7/396, no. 4102, Fath, in the chapters on military expeditions, the Battle of the Trench, and it is found among all the imams.