When the Messenger of Allāh ﷺ became able to walk and he ﷺ had reached the age of two years, he ﷺ began to graze animals. One day, the Messenger of Allāh ﷺ had gone out to rear the animals when two angels came and laid him ﷺ on his back. They opened his blessed chest down to the navel and took out his blessed heart.  They then washed it and filled it with SakīnahSakīnah was something similar to ground medicine, from the angelic realm. The two angels placed the blessed heart back into the chest and sealed it. The Messenger of Allāh ﷺ felt no pain whatsoever during this. However, seeing this, the son of Sayyidatunā Ḥalīmah radiyAllahu ‘Anha became terrified and ran back to his mother. He said to her, “Two men have torn the chest of our Makkan brother.” Sayyidatunā Ḥalīmah rushed to the Messenger of Allāh ﷺ and saw that he ﷺ was sitting and his blessed face had become slightly pale. She asked, “What has happened?” The Messenger of Allāh ﷺ then recounted the entire incident. Sayyidatunā Ḥalīmah returned with him ﷺ to their home, however, she had become worried by this and decided to return him ﷺ to his mother in Makkah al-Muʿaẓẓamah.

Shaykh ʿAbd al-ʿAzīz Muḥaddith al-Dihlawī Rahmatullahi ‘Alayh writes in Tafsīr Sūrat al-Inshirāḥ that the blessed chest was opened four times: firstly while in the care of Sayyidatunā Ḥalīmah; secondly at the age of ten years; thirdly before waḥy (revelation) and fourthly on the night of Miʿrāj.

Note: The first opening occurred for the reason that the desire for fun and games children have in their hearts would leave the heart of the Messenger of Allāh ﷺ. The second opening was so that the blessed heart would not incline towards those things which are against the pleasure of Allāh ﷻ, committed in the energy of youth. The third opening was so the blessed heart would carry the weight of waḥy. And the fourth opening was in order for the Messenger of Allāh ﷺ to behold the Malakūt (angelic) and Lāhūt (divine) realms.

Chapter three of Tawārīkh e Ḥabīb e Ilāh by Muftī ʿInāyat Aḥmad Kākorawī Raḥmatullāhi ʿAlayh