بسم الله الرحمن الرحيم
Yes, it is lawful to supplicate Allah for the birth of a child. The supplication of Hadhrat Sayyidina Zakariya (على نبينا وعليه الصلاة والسلام) is mentioned in the holy Quran for the same purpose.
رَبِّ لَا تَذَرْنِي فَرْداً وَأَنتَ خَيْرُ الْوَارِثِينَ [الأنبياء : 89]
If the husband and wife recite this blessed dua with durood before and after extensively on daily basis, then they shall have a son, in-shaAllah. May Allah bless you a pious son, Amen!
Allah knows Best!
Darul Uloom Deoband