Mallard has already approved four applications for up to one week of compassionate leave to MPs wanting to bond with their newborns. Each application has to be approved by the Speaker on a case-by-case basis.
Staff, known as the parliamentary storks, are now regularly bringing babies to their mothers in the debating chamber, because caregivers do not have direct access to the chamber.
The swimming pool in the parliamentary gym no longer has a ban on children, and now there is a weekly session where mothers or caregivers can take young babies for a swim together.
The Parliament House atrium, too, has had a ban on children lifted.
Prime, who also has a daughter turning 3 next week, said the Speaker's encouragement was a revelation.
"It's made a huge difference. It has meant I have not had to choose between taking on the role as an MP and having a family, and for that I'm so grateful."
She said her mother Nandy makes frequent use of the family room next to the debating chamber that is equipped with a bathroom, change-table and sleeping basket, and toys.
"The important thing about that space is that it's so close to the House, so if they need you or you need them, you're right there."
Prime said it was important to recognise that every baby is different.
Former Green MP Holly Walker said her baby would have "screamed the House down with reflux and vomited on my papers" if she had brought her into the debating chamber.
Walker stepped down from Parliament when her partner developed health issues and she could not cope with being an MP as well as the primary caregiver for her baby.
But she stressed that there were no structural barriers to making it work.
"I wanted people to know that I had simply experienced a particularly difficult run of bad luck. Others could – and should, I insisted – do it in my wake," Walker wrote in an essay published in The Interregnum: Rethinking New Zealand.
Prime said it was up to Ardern and Clarke Gayford if they wanted to bring their baby to Parliament.
"All I know is that the support is there for it to be able to happen."
At least five MPs have babies under 1 year old: Prime, Kiri Allan, Simon Bridges, Kris Faafoi and Chris Penk.
Parliament has come a long way in terms of being family-friendly.
In 1970, Labour's Whetu Tirikatene-Sullivan brought her baby to work, then in 1983 National's Ruth Richardson brought her baby to work (after giving birth during recess) and a special breastfeeding room was organised for her.
Then in the 1990s, the childcare centre was established.
In 2002, former National MP Katherine Rich breastfed her baby Georgia in the House. She said both her children were welcomed at Parliament and there was never a shortage of people to hold, cuddle and give advice.