The parents had moved the Indore bench of high court with a 'habeas corpus' petition seeking that the police produce their children before the court.
The Government Railway Police apprehended the children with a man and a woman from the railway station here about a week ago after a local Hindu outfit alleged that they were being taken to Mumbai for conversion.
The court ordered the GRP to produce them and, after speaking to the children, a bench of Justices Alok Varma and S C Sharma directed the police to hand over the children to their parents in accordance with their own wish, said advocate K P Gangore, the petitioners' lawyer.
According to the GRP, the children were "rescued" from the railway station on October 23 when they were being taken to Mumbai by a man and a woman.
The duo was arrested under the Madhya Pradesh Religious Freedom Act.
Parents of some of the children said they were Christians and were going to Mumbai for religious studies of their own will.