In one narration the words are: Then we set off and camped at a place. The Prophet (peace and blessings be upon him) fell asleep, and a tree came splitting through the ground and covered the Prophet (peace and blessings be upon him) with its shade, then it went back to its place. When the Prophet (peace and blessings be upon him) woke up, I mentioned this to him. He (peace and blessings be upon him) said: "That tree had asked its Lord for permission to greet the Messenger of Allah (peace and blessings be upon him) with salam, and the Lord gave it permission."
Ahmad recorded it with two chains, and al-Tabarani recorded something similar; the narrators of one of the two chains of Ahmad are the narrators of the Sahih.