An after dinner coffee can disrupt your sleep for most of the night, reducing the amount of shut-eye you get by up to an hour, according to new research.

The hot drink’s stimulating effects last for up to six hours meaning even a coffee before you leave work can interrupt your sleep.

The results showed between two and three cups of coffee, about 400mg of caffeine, taken six hours before going to bed had a dramatic effect.

Psychiatrist Professor Christopher Drake, of Wayne State University, in Michigan, said: ‘Drinking a big cup of coffee on the way home from work can lead to negative effects on sleep just as if someone were to consume caffeine closer to bedtime.

‘People tend to be less likely to detect the disruptive effects of caffeine on sleep when taken in the afternoon.’

His researchers analysed 12 normal sleepers who were instructed to maintain their usual schedules and were given three pills a day for four days with one at six, three and zero hours before bedtime.

One contained 400mg of caffeine, and the other two were a placebo. On one of the four days, all three pills were a placebo.

Sleep disturbance was measured subjectively with a standard sleep diary, and objectively using a home sleep monitor.

Dr Safwan Badr, of the American Academy of Sleep Medicine, said: ‘Sleep specialists have always suspected caffeine can disrupt sleep long after it is consumed.

‘This study provides objective evidence supporting the general recommendation avoiding caffeine in the late afternoon and at night is beneficial for sleep.’

The research published in the Journal of Clinical Sleep Medicine is the first to investigate the effects of a given dose of caffeine taken at different times before sleep.

The results suggest caffeine generally should be avoided after 5pm in order to allow for healthy sleep.

Experts have found caffeine, the stimulant in coffee, interrupts the flow of melatonin –the chemical that actually sends us to sleep.

Secreted by the pineal gland deep in the brain, the hormone helps control body rhythms and tells our bodies when to sleep and when to wake.

A previous study in Israel showed caffeinated coffee halves the body’s levels of the sleep hormone and leads to an hour and a half less sleep a night.

Britons spend about £850million a year on coffee. Researchers at Bristol University have shown drinking several cups each morning helps people to work more efficiently.

But heavy consumption of more than four cups a day has been linked to ill health.