Can my 4 y/o daughter from another mother sleep in the bed with me and my wife?

My daughter lives with her mother(she has legal custody), her grandparents, her aunt and her cousin in a 3 bedroom house. She does not have her own room. My daughter is therefore so accustomed to sleeping in the same bed as so many other people tha she refuses to sleep in her own room and her own bed. She... show more My daughter lives with her mother(she has legal custody), her grandparents, her aunt and her cousin in a 3 bedroom house. She does not have her own room. My daughter is therefore so accustomed to sleeping in the same bed as so many other people tha she refuses to sleep in her own room and her own bed. She continually throws fits over sleeping in her room and sneaks in the middle of the night at the foot of my bed with me and my wife. I heard that in New York State that a child cannot sleep in the same bed as anyone except a parent. Would i get in trouble for her sleeping in my bed with me and my wife? My daughter has mentioned that she slept in our bed once to her mom and her mother got so furious but i responded that it's basically her fault for not providing for her a bed of her own and a room as I have. Do I let her just sleep in my bed with me and my wife? I am not willing to compromise by not sleeping with my pregnant wife. I will not let my wife sleep alone.
Update: I am willing to teach her to sleep on her own but i don't think that my work will be consistent when she goes back to her mom's house where she's still being allowed to sleep with other people. I totally feel she shoudl have been on her own since she was 5 months old until her mother came back from iraq... show more I am willing to teach her to sleep on her own but i don't think that my work will be consistent when she goes back to her mom's house where she's still being allowed to sleep with other people. I totally feel she shoudl have been on her own since she was 5 months old until her mother came back from iraq and screwed that up. This has been a very long term issue that i just can't seem to get straightened out with only 4 days per month. No child can learn something this big in only 4 days per month so spread out like that. I think it needs to be done by her mother. Should i bring this issue up in court to the law guardian and judge in my next month's appearance? And is this not being allowed to be sleeping with step parents really a law?
Update 2: Thank you all for your answers i didn't think i'd get 20 answers in a half hour and i expect i'll be getting more. I just want to add that i'm also tired of breaking all my daughter's bad habits because of her mother's irresponsibility. Like I said earlier, I had already taught my daughter... show more Thank you all for your answers i didn't think i'd get 20 answers in a half hour and i expect i'll be getting more. I just want to add that i'm also tired of breaking all my daughter's bad habits because of her mother's irresponsibility. Like I said earlier, I had already taught my daughter to sleep on her own when she lived with me while her mother was in Iraq for a year. But after she came back and took back custody, she put her back on all her 1 and 2 year old bad habits that i had to take a year to break. I'm just exhausted with it. it was so much easier to get her to sleep at 2 years old because she'd actually get so tired of fighting with me. I also just don't have the motivation to be stern with her while i do need my sleep these days and I feel like just letting things like this slide. I"m just pissed off that she's 4 year's old with this problem. She used to also know her ABC's and count to 30 when she was 1.5 years. She also had to relearn that this past year. Totally pissed..
20 answers 20