Staying awake all night to study for a test might be a bad idea! A new study shows that lack of sleep can lead to memory problems.

Researchers at the Michigan State University and the University of California, Irvine found that sleep-deprived participants had poor memory and performed badly at a test that required them to remember a series of images.

Previous research has shown that chronic sleep deprivation can lead to several health problems. In fact, lack of adequate shuteye at night is associated with breast cancer. Going without sleep for just 24 hours could lead to hallucinations and even schizophrenia-like symptoms.

Altered memory due to lack of sleep is dangerous as an eye witness of a crime scene might misidentify the perpetrator.

"We found memory distortion is greater after sleep deprivation," said Kimberly Fenn, MSU assistant professor of psychology and co-investigator on the study. "And people are getting less sleep each night than they ever have."

For the study, researchers kept a set of participants awake for 24 hours to see if sleep-depreivation affects memory. The team found that even people who slept for five hours were also highly likely to commit blunders in the memory test than other people.

"People who repeatedly get low amounts of sleep every night could be more prone in the long run to develop these forms of memory distortion," Fenn said in a news release. "It's not just a full night of sleep deprivation that puts them at risk."

Research has shown that people in the U.S. and Japan get fewer hours of sleep during weekdays than other countries.

The study is published in the journal Psychological Science.