If the mother doesn't drink/smoke, has normal sleep, and the baby is healthy, it's not considered dangerous and was practiced by all of humankind for most of its past. Separate rooms and separate beds are a very, very recent invention. For most of humankind's history mothers slept with their babies.