It looks like Mom's advice was right—to look your best, get a full night's rest, a new study shows.

People who get eight hours of sleep appear healthier, more rested and more attractive than those who stay up all night, said study researcher John Axelsson, of the Karolinska Institute in Sweden.

"The study suggests that your sleep, and how you sleep, affects how other people perceive you, and probably how they treat you," Axelsson told MyHealthNewsDaily.

People often resort to beauty treatments to make them look awake and refreshed, and to boost self-confidence. But in the long term, simply getting enough sleep could achieve the same aesthetic results, Axelsson said.

"Sleep is the best beauty treatment that we have," he said.

Researchers asked 23 people, ages 18 to 31, to get eight hours of sleep one night, and then photographed them the next day. The pictures were taken between 2 p.m. and 3 p.m. in a well-lit room, with a fixed distance between their faces and the camera.

On another night, those same people got five hours of sleep. Researchers then kept them awake for 31 hours, and took their pictures again at the same time of day.

During both photography sessions, the participants wore no makeup, wore their hair loose and combed back, and groomed themselves the same way. Their expressions in the photographs were required to be relaxed and neutral.

Sixty-five observers were then asked to rate the photographs, without knowing how much sleep the people in the pictures had gotten the night before.

The observers rated the photographs taken when people were sleep-deprived as 6 percent less healthy, 4 percent less attractive and 19 percent more tired-looking on average, than the photographs taken when they were well-rested.

The study shows that the amount of sleep people get affects how others judge their health, Axelsson said.

Past research has shown that the importance of getting enough sleep goes beyond looking pretty. A 2007 study in the journal Archives of Disease in Childhood found that people who don't get enough sleep have an increased risk of being obese. Another study that year in the journal Science found sleep is necessary to form memories.

Next, Axelsson and his colleagues hope to see how other sleep disturbances, such as sleeping for four to five hours a few nights in a row, impact how healthy and attractive people look. He is also looking to pinpoint the facial features that make a person think someone looks tired, unhealthy or  less attractive.

The study was published online Dec. 14 in the British Medical Journal.

Pass it on: Getting eight hours of sleep a night can make you look healthier and more attractive.

Follow MyHealthNewsDaily staff writer Amanda Chan on Twitter @AmandaLChan.

This article was provided by MyHealthNewsDaily, a sister site to LiveScience.