Used to soothe an infant to sleep, especially in accompaniment to the rocking of a cradle or the rocking of the infant in one's arms. Frequently in nursery rhymes, especially in "rock-a-bye, baby". Also in (usually humorous) extended use. Compare "hushaby", "lullaby [noun]".
Early 19th century; earliest use found in Songs for Nursery. From rock + -a-, connective element + bye.