Newborns are vulnerable in many ways - infections, kidnapping, theft, mistaken identity, etc.
If not authorized, you as John Q. Public will not get into any maternity ward outside of some third world level "hospital" on any kind of ruse. Maternity wards are usually separately entranced and 24/7 guarded. You need prior clearance with an identity bracelet that will be scanned. Any non-maternity staff that are working there - maintenance, etc - are escorted.
The maternity staff have no tolerance for out-of-policy actions. It's their asses on the line. You will be subject to arrest.
Frankly, if it was any of my family in maternity, I wouldn't want any sneaky pete's there. It's not Karen, it's Kareful.
Enjoy the post-birth pics, video or facetime. Congratulations on your grandchild!