Have you ever had nights when you feel like you barely slept, only to hear from your partner in the morning that you were actually out like a light?

It turns out that many people are terrible judges of how much shut-eye they get. That is especially true for those who have insomnia. Many people with insomnia think they sleep much less than they actually do. They tend to misjudge how long it takes for them to fall asleep and how often they wake up during the night. Sometimes people can even mistake being asleep for being awake.

The disconnect between perceived and actual sleep reveals a striking fact about insomnia: You can have insomnia and still get an adequate number of hours of sleep. New research is showing that insomnia is less about the amount you sleep and more about what your brain does during sleep.

About 30 percent of American adults have symptoms of insomnia each year, according to scientific studies. And about 10 percent of the population has chronic insomnia, which is generally defined as having difficulty sleeping at least three times a week for three months or more. People with chronic insomnia also tend to feel tired, grumpy and foggy-headed during the day.

Some patients complain to doctors that they sleep poorly, “but when they measure [your sleep], you look fine. It is almost as if you’re lying,” says Nicole K.Y. Tang, an associate professor of clinical and health psychology at the University of Warwick in England. Sleep specialists generally assess sleep using sleep diaries, polysomnography, which measures brain waves, heart rate and other functions, or actigraphy, which measures motor activity.

About half of those with insomnia sleep a normal amount, or at least six hours a night. In one study, about 42% of people with insomnia who slept a normal amount underestimated how much they slept on a particular night by more than an hour. Only about 18% of normal sleepers underestimated by that much. The study, published in 2011 in Psychosomatic Medicine, followed 142 people with insomnia and 724 controls.

By contrast, people who don’t sleep much overestimate how much they sleep.

Click for more from The Wall Street Journal.