Right from Andrea Hagg herself! :
"In the episode Piper tells them that the baby will carry one the Halliwell name...Leo's fine with it.
Well in the begining of the episode they discuss using "Peter" since they were looking at "P' names, but Phoebe doesn't like it cause he might get teased at school. Through the whole episode the baby goes nameless until the end where Piper announces the name. Piper wants to thank Paige for almost losing her life in saving her nephew, so she uses the name "Matthew" to honor one of his God-mothers and Paige's last name. And for Leo almost losing his life to save their child by naming it after his last name "Wyatt". Phoebe says not to use Leo Jr., in an earlier scene, as a name, because the kid will lose his identity.
You know, that the baby's name, if it was going to be a girl was decided on too...it was going to be 'Prudence Melinda Halliwell'"