As a landlord myself and also pregnant I can see this from both sides.
The pregnant side of me says it is none of anyone's business.
The landlord side of my says I would want to know, but it is in our tenants contract who is registered to live there and they need to request permission for any changes (I thought this was standard in tenancy agreements to prevent subletting etc).
To the previous poster who said that landlords will love families, not necessarily. I think if anything, unless they're on benefits so will be receiving more by having kids, the kid will take up more money, meaning less money available for the rent. It also means there is more risk of damage to the property. Sick/poo on carpets (and furniture if it is furnished) possible damage to walls if stair gates need to be screwed in. Damage to walls if when the baby turns to a toddler decides to draw on them. Damage to kitchen cabinets if child locks are used that need to be screwed. Damage and scuffs to walls, doors and skirting boards from pram.
It also means that if for any reason the landlord needs/wants the property back in the future (e.g to sell for financial reasons) I think it would be harder to evict a family with a baby.
I'm not condoning it, as our tenants have a kid and a dog and we are happy with that, but I can see why some landlords might be unsure.
In short, I'd just tell them. It's best not try and keep secrets form your landlord, especially if you know they will find out eventually. Honesty is the best policy and all that. Providing they have been generally decent landlords so far, the flat is suitable for a baby (which I assume it must be, or I guess you would have wanted to leave anyway) and they haven't given any indication that children would not be welcome (e.g in the tenancy agreement) I don't think you will have anything to worry about.