Dear Sir/Madam, usually granted temprorty cutody during the course of seperation to maintain the child in custody of mother (who is natural mother of child) in question, which is ordered by the competent court of law, i.e., family courts/District Courts as case may be. It is setted law. The under section 10 of the Hindu Marriage Act, say about Judicial Seperation. In Generally, Section 23 of the Special Marriage Act, 1954. In parsi law, under section 34 of the Parsi Marriage & Divorce Act, 1936. In Christian Law : Section 22 of the Divroce Act, 1869. In Muslim Law, no provision.
Disclaimer : This answer is based on information given by you hence, It is just opinion of Lawyer. For specific answer you have to give details and facts and choose the Lawyer of your choice.