The 30-year-old is to remain there following the completion of a psychiatric report.
Belfast Magistrates' Court was told she would not be able to leave without the hospital's permission.
The woman cannot be named amid claims that identifying her would increase the risk of her taking her own life.
A press challenge to the temporary reporting restrictions is due to be heard next month.
The woman was arrested by detectives investigating the child's death following an incident in Belfast in March.
She was charged with murder and then held under the Mental Health Act.
Her barrister revealed on Wednesday that a medical report had now been prepared.
Based on its contents he sought a termination of the current arrangements for keeping his client at the facility.
"The application is that she be remanded on bail, subject to the condition that she continues to reside (there)," he said.
A doctor who assessed the accused confirmed that the health trust consented to the proposal, provided the accused was there as a detained person.
The judge was informed that under those arrangements the woman would not be able to leave.
Granting the application, she listed the criminal proceedings for a further update in eight weeks time.
A woman accused of murdering her baby son has been remanded on bail at a mental health facility.