Sleep like a baby?

Who came up with the saying “to sleep like a baby”? Because they sure never slept in the same room as a baby.

Our newborn daughter sounds more like a pterodactyl than a baby when she sleeps. She spits out a constant sputtering of prehistoric sounds.