Everyone knows that an easy trick to calming a restless infant is to rock them back and forth. For whatever reason, the gentle side-to-side motion seems to soothe small children and lull them off to dreamland.

You wouldn’t exactly expect the same thing to work for a grown adult, but a new study suggests that rocking away while sleeping might actually have some huge benefits, including deeper sleep, waking up less, and even improved memory.

Rocking a baby to sleep is easy because they’re so small, but rocking a full sized adult is a bit more challenging. To make it possible, researchers from the University of Geneva constructed a bed that slowly rocks back and forth on a large frame.

To test whether rocking aids or hinders adult sleep, the team recruited 18 individuals to each spend a night in it. Equipped with electrodes to monitor brain activity, the participants dozed off while the researchers gathered data. Each person was asked to spend three nights in the bed. The first night was to help them feel comfortable, the second was used to monitor brain activity while rocking and sleeping and the third was a night in the same bed without the rocking movement.

As BBC reports, the team found that rocking while sleeping allowed the subjects to achieve deeper sleep and were less prone to waking up over the course of the night. The rocking was gentle enough so as to not cause a feeling of “sea sickness,” and the subjects experienced the deepest sleep during the rocking test. This more restful sleep promoted brain functions like memory, which was tracked using memory tests given to each participant.

Replicating something similar in your own home would likely be next to impossible, so don’t throw your back out trying to hang your mattress from your bedroom ceiling or anything, but it’ll be interesting to see if this becomes a new trend for people who value a good night’s sleep.