I have heard it has been associated with bad outcomes in young children, yes. I certainly wouldn't give it to a young baby for that reason, unless there was serious medical need. I'm surprised a doctor would suggest it for a baby simply to sleep, especially since not sleeping is pretty normal and healthy baby behaviour.