My question involves name change laws in the State of: Maryland for children ~ New York for myself

I have sole custody of all three children with no rights of visitation until "further order of the court" for their father who is currently incarcerated. Their father is currently incarcerated for menacing charges (2nd & 3rd degree sex offense, 2nd degree assault and 2nd degree rape). Originally it was in addition to 2nd degree attempted murder, 1st and 3rd degree rape and 1st & 3rd degree assault but the jury found him not guilty on those charges. "scoff"

I am currently seeking a name change for the one child who has the father's name on his birth certificate. He is also his father's namesake (a III). How will I be able to change the name of the child to my last name? What if I am changing the name for religious reasons (to a Hebrew name)? The other two children do not have their father's name on the birth certificate, so I don't see any problems posing from their name change.

**In addition, I am a resident of Maryland but I was born in one of the burroughs of New York. Do I need to apply for MY name change in the courts of MD or NY?