A woman sleeps in an undated photo. A German scientist has come up with a solution for snoring -- a computerized pillow that shifts the head's sleeping position until the noise stops. REUTERS/PRNewsFoto

BERLIN (Reuters) - A German scientist has come up with a solution for snoring -- a computerized pillow that shifts the head’s sleeping position until the noise stops.

Daryoush Bazargani, professor of computer science at the University of Rostock and the pillow’s inventor, was displaying a prototype of his pillow at a health conference in Germany on Wednesday.

“The pillow is attached to a computer, which is the size of a book, rests on a bedside table, and analyses snoring noises,” Bazargani told Reuters.

“The computer then reduces or enlarges air compartments within the pillow to facilitate nasal airflow to minimize snoring as the user shifts during sleep,” he said.

The ergonomic pillow can also be used for neck massages.

Bazargani said several U.S. firms were interested in manufacturing the pillow.

“I invented it because I snore,” he said. “I tried all sorts of products, but nothing worked. I hope people who use it will sleep more peacefully.”