A lack of sleep may cause you to develop memories of events that never actually happened, according to a new study from researchers at Michigan State University and the University of California, Irvine.

Stephen Frenda, who helped lead the study, explains he wanted to look specifically at how sleep loss affects people's recollections of detailed events. The experiment involved 104 people who were asked to look at pictures of a crime scene. One group was allowed to go to sleep; the other group had to stay awake all night in the lab.

See also: A Way to Monitor Your Sleep Without Wearing a Tracker

Afterward, the first group could describe the pictures well, while the second group had trouble recollecting them, adding false details to their descriptions.

Sleep deprivation doesn't just mean staying up all night; it can also mean repeatedly getting little sleep, like five hours per night or less. Previous sleep deprivation studies have shown that a lack of sleep can affect both your long-term and short-term memory and hunger levels, and can result in a loss of brain cells.

This study was published in the journal Psychological Science, the flagship journal of the Association for Psychological Science.