All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
It is permissible for your father-in-law [father of your wife] to take the responsibility of paying those expenses and he will be rewarded for that, Allaah willing, if he seeks the reward from Allaah; Allaah Says (what means): {And whatever good you put forward for yourselves — you will find it with Allaah, it will be better and greater in reward.}[Quran 73:20]
Moreover, it is confirmed that the Prophet said: “An act of charity on a poor person is only (counted as) charity, while an act of charity on a relative is (counted as) an act of charity and maintaining ties with kinship.” [Ahmad, An-Nasaa'ee, At-Tirmithi and Ibn Maajah]
Besides, a husband is not sinful nor deserving the punishment (from Allaah) unless he is negligent of his duties towards his wife. For instance, he is obligated to spend on her as we clarified in Fatwa 83530. As regards paying the expenses of her medical treatment, then it is a matter of difference of opinion among the scholars whether or not it is an obligation on the husband as we clarified in Fatwa 101312. However, some scholars are of the view that the husband is obligated to pay his wife’s midwife fee in particular.
To conclude, you are not sinful as we already mentioned if your father-in-law accepted responsibility for paying the expenses of your wife.
Allaah Knows best.