If it takes you more than half an hour to fall asleep at night, and find yourself counting sheep, you may have a sleeping problem.

Waking up at night and taking more than 41 minutes to drift back off is another sign of poor quality sleep.

The first guidance to be published on what exactly makes up a good night’s sleep shows many more of us are struggling than we might think.

A panel of experts who examined 227 scientific studies found people who wake up more than once a night and sleep less than 85 per cent of their time in bed are not getting good quality slumber.

The results could mean a greater risk of heart disease and diabetes, both linked to a lack of shut-eye. Not getting enough sleep is linked to putting on weight, fatigue, depression and can affect the fertility of couples who are trying for a baby.

The National Sleep Foundation’s guidelines highlight that sleep changes as people get older.

However adults should not be taking any longer than 30 minutes to fall asleep, with a time lag of 45 to 60 minutes classified as poor sleep quality. Older people should be concerned if it takes them more than an hour to nod off.

On the all-important matter of naps, the experts now says adults of any age should not be sleeping for more than 100 minutes at a time, and should not take more than four naps a day if they are sleeping properly.

Dr Max Hirshkowitz, chairman of the board of directors at the National Sleep Foundation, which is based in the US, said the findings will help the millions of people now using digital technology, like Fitbits, to track how well they snooze.

He said: ‘These devices provide a glimpse into one’s sleep universe, which is otherwise unknown. The National Sleep Foundation’s guidelines on sleep duration, and now quality, make sense of it all – providing consumers with the resources needed to understand their sleep.

‘These efforts help to make sleep science and technology more accessible to the general public that is eager to learn more about its health in bold new ways.’

A third of people in the UK suffer from poor sleep, with the blame put by experts on stress, home computers and taking work home with us.

The new research, published in the journal Sleep Health, shows people should not spend any more than a quarter of their time in bed lying awake.

People who sleep well and are woken up in the night should take only up to 20 minutes to fall back to sleep, with children and adults facing a problem if it takes them more than 41 minutes.

Teenagers, who need more sleep generally, can get away with napping for longer, with the guidelines stating there is a problem only if their power nap takes more than two hours, compared to 100 minutes for adults.

But if they are sleeping well they should not take as many naps, with the limit set at one a day, while older adults can take up to four in 24 hours before the experts say they have poor sleep quality.

However there is some doubt over the evidence, as the scientific literature does not distinguish between planned and unplanned naps.

Many people are likely to find they do not meet the guidelines for sleep, with a previous US survey showing as many as 27 per cent of people take more than half an hour to fall asleep.

Dr Maurice Ohayon, MD, DSc, PhD, director of the Stanford Sleep Epidemiology Research Centre, said: ‘In the past, we defined sleep by its negative outcomes including sleep dissatisfaction, which were useful for identifying underlying pathology.

‘Clearly this is not the whole story. With this initiative, we are now on a better course towards defining sleep health.’