good question but also have a look at section 6 of the Hindu Minority & Guardinship Act,
6. Natural guardians of a Hindu Minor. The natural guardians of a Hindu minor, in respect of the minor' s person as well as in respect of the minor' s property (excluding his or her undivided interest in joint family property), are-
(a) in the case of a boy or an unmarried girl- the father. and after him, the mother: provided that the custody of a minor who has not completed the age of five years shall ordinarily be with the mother;
(b) in the case of an illegitimate boy or an illegitimate unmarried girl- the mother, and after her, the father; (c) in the case of a married girl- the husband: Provided that no person shall be entitled to act as the natural guardian of a minor under the provisions of this section-
(a) if he has ceased to be a Hindu, or
(b) if he has completely and finally renounced the world by becoming a hermit (vanaprastha) or an ascetic (yati or sanyasi). Explanation.- In this section, the expressions" father" and" mother" do not include a step- father and a step- mother.
Also there are many judgment give of ur related query let see what are LD members has to say.
Also ur question is not clear as u have mentioned that mother is staying in MOTHER OF THE BABY IS STAYING IN HER PARENTS HOUSE
& IN THE ABSENCE OF MOTHER means the mother is working somewere else or if she's is staying in this parent's house than who can she be absent?