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.

An "environmentally friendly" building with a cafe, gallery and shop is planned for the park near Wakefield.
Peter Murray, executive of the YSP, said it would provide an "important new element" of the park's infrastructure and increase its income.
Arts Council England has given £1.7m to the park and the remainder is to come from fundraising.
A planning application for a second visitor centre has been submitted to Wakefield Council and it is due for completion in late 2017.
The new building has been designed to make the minimum impact on the site, YSP said.
The latest project on the 500-acre estate follows the development of the main visitor centre in 2002, the underground gallery in 2006 and refurbishment of the estate chapel in 2011.
The park attracted more than 400,000 visitors in 2014 the highest number since it opened in 1977, it said.
The development plans were revealed as the park's latest sculpture Wave is being installed.
It is part of the installation Blood Swept Lands and Seas of Red that was seen at the Tower of London in 2014 where 888,246 poppies honoured every death in the British and Colonial forces of World War One.

Derbyshire Wildlife Trust took legal action after Derby City Council approved the track, to be built on part of the Sanctuary nature reserve.
The trust said the development would damage the habitat of rare birds.
An interim order to stop work was issued last week and will remain in place until the judicial review.
Mrs Justice Lang said all equipment had to be moved from the site and the judicial review must take place within the next three months.
Tim Birch, conservation manager at the Derbyshire Wildlife Trust, said: "We are relieved to have got through this latest step in our fight to save the Sanctuary Local Nature Reserve.
"We believe that the development of this local nature reserve sets a very dangerous precedent both locally and nationally which is why we are challenging the decision of Derby City Council to destroy it."
The judicial review will look into the legality of Derby City Council's decision to approve the cycle track.
No-one from the authority was available for comment.
The Sanctuary, which lies close to the Pride Park football stadium, was given the go-ahead by the council in 2003.
Threatened bird species including skylarks and lapwings are visitors to the site, according to conservation managers.

Sherri Papini was still bound with restraints when she managed to flag down a car on Thursday some 140 miles (225km) from where she was last seen.
Police, who say she was released by her captors, are looking for two women in connection with her disappearance.
Ms Papini's husband had reported her missing after she failed to pick up their children from day care.
The motive behind her abduction in Redding, northern California, on 2 November, is still unclear.
County Sheriff Tom Bosenko told reporters Ms Papini was receiving medical attention for non-life threatening injuries at a nearby hospital.
"We are very thankful on this day [Thanksgiving] that she was found safe and reunited with her family.''
A $50,000 (Â£40,200) reward is being offered to find those responsible for Ms Papini's capture.
Investigators had interviewed hundreds of local residents regarding her disappearance and received some 400 tips.
A woman accused of murdering her baby son has been remanded on bail at a mental health facility.
[NEXT_CONCEPT]
Yorkshire Sculpture Park (YSP) has unveiled plans for a new £3.8m visitor centre at its Bretton Park entrance.
[NEXT_CONCEPT]
Work to build a cycle track in Derby cannot resume until a judicial review is carried out, a judge at the High Court in London has ruled.
[NEXT_CONCEPT]
A missing California mother of two has been found three weeks after she was abducted while out jogging.