Yeah while caring for your child. If she gained it out drinking casa migos and eating crab legs, sure...But she's being a dutiful mother who in the first year of her child's life is catering to the needs of that child. So she's feeding the child, bathing the child, changing the child, taking care of the home. Probably eating like shyt, sleeping like shyt, it's no surprise that she's gaining weight. This ain't hollywood where you can just pass off a baby to a nanny and go do a 2 hour zumba class.
Now if you're really invested in this woman then you come up with a plan of attack, and stick to it. Go to the gym together, and make sure you're eating right, so you both can be healthy for the baby.