Researchers at MIT have come up with a whole new kind of home sleep testing, reports IEEE Spectrum.

MIT researchers have now come up with a way to wirelessly capture data on sleep patterns from the comfort of a patient’s home. Their laptop-sized device bounces radio waves off a person, and a smart algorithm analyzes the signals to accurately decode the patient’s sleep patterns.

The device could allow experts to monitor someone’s sleep for weeks or months rather than once every few months in an overnight lab. Apart from enabling physicians to diagnose and study sleep disorders, they could also use it to understand how drugs or illnesses such as Parkinson’s disease, Alzheimer’s disease, epilepsy, and depression affect sleep quality.

“Doing this wirelessly in your own bedroom, you could really see the impact of drugs, and progression of diseases by long-term monitoring,” says Dina Katabi, a professor of electrical engineering and computer science at MIT who led the work.