My daughter just turned 40 days old and I went to the mosque to do the traditional sajdah which is done in my home country of Pakistan. The Imam there however refused to do it because it is not in any Hadeeth. He also said that the prophet (pbuh) didn't do it and we shouldn't try to be better than him.
Praise be to Allaah.
This prostration, as the imaam of the mosque said, has no basis (in Islam). Yes, there is sujood al-shukr (prostration of thanksgiving) which is prescribed when a new blessing comes or something bad is warded off, but this is no longer applicable when such a long time has passed.
- Shaykh ‘Abd al-Kareem al-Khudayr.
If you had done the prostration of thanksgiving when your daughter was born safe and sound and her mother was fine, we would say that this is good, and is an action prescribed by Islam. But allocating a specific time of forty days, and saying that it has to be done in the mosque, is bid’ah. May Allaah help us and you to do all that is good.