Fighting off illness - rather than the illness itself - causes sleep deprivation and affects memory, a new study has found.

University of Leicester biologist Dr Eamonn Mallon said a common perception is that if you are sick, you sleep more.

But the study, carried out in flies, found that sickness induced insomnia is quite common.

Dr Mallon said: "Think about when you are sick. Your sleep is disturbed and you're generally not feeling at your sharpest. Previously work has been carried out showing that being infected leads to exactly these behaviours in fruit flies.

"In this paper we show that it can be the immune system itself that can cause these problems. By turning on the immune system in flies artificially (with no infection present) we reduced how long they slept and how well they performed in a memory test.

"This is an interesting result as these connections between the brain and the immune system have come to the fore recently in medicine. It seems to be because the two systems speak the same chemical language and often cross-talk. Having a model of this in the fly, one of the main systems used in genetic research will be a boost to the field.

"The key message of this study is that the immune response, sleep and memory seem to be intimately linked. Medicine is beginning to study these links between the brain and the immune system in humans. Having an easy to use insect model would be very helpful."

The research has been published in the journal PeerJ.