Who volunteered to lie in the Prophet's bed at the night of his migration? And what did happen then?

Ali volunteered to lie in the Prophet's bed even though there were great dangers impended over him. At last he did that risking his life and consequently the Prophet's life was saved.

As the night advanced, the assassins posted themselves round the Prophet's dwelling. They watched all night long, waiting to murder Muhammad. By some the Prophet had warned of the danger, and he directed Ali to lie down in his place and wrap himself up in his green clock, which he did. The Prophet miraculously escaped through the window.

When the plotters attacked the Prophet's bed and unsheathed their swords they found Ali sleeping in the bed. They asked: “Where is Muhammad”. Ali replied: “Had you entrusted me with him that you are asking me now”. They had no reply to this. They left seeking after the Prophet.

Ali was highly praised by Allah on account of this devotion. Almighty Allah says: “And among men is one who sells himself to seek the pleasure of Allah and Allah is affectionate to the servants”. (Qur’an; 2:207)

Then the Prophet (peace be upon him and his pure progeny) with Abubakr went to a cave on the mountain of Thaur and stayed there for three nights.