Abu al-Walid said: I asked Ibn Umar (may Allah be pleased with them both): How did the pebbles in the mosque begin? He said: Yes; it rained during the night, and when we went out for the morning prayer, each person, passing over the Batha, took some pebbles in his garment, spread them beneath him and offered the prayer on them. When the Prophet (peace and blessings be upon him) saw this, he said: "How fine a carpet this is!" That is how the pebbles in the mosque began.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4313
Urwah (may Allah have mercy on him) said: The first to spread pebbles in the mosque, the mosque of the Messenger of Allah (peace and blessings be upon him), was Sayyiduna Umar bin al-Khattab (may Allah be pleased with him). He said: "Spread it with pebbles from the blessed valley," meaning al-Aqiq.
This is how Urwah narrated it; the hadith of Ibn Umar is muttasil (connected), and there is no harm in its chain.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4314
It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him), or from Ka'b, that he said: The pebbles of the mosque implore the one who takes them out when he removes them from the mosque.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4315