Curling up for a good night’s sleep when you are feeling under the weather may be just the antidote.

But some birds risk their lives by snuggling up to conserve energy.

Songbirds tuck themselves in differently depending on how worn out they are, scientists say.

Birds that are low on fat reserves will nestle their head under their feathers for a deep snooze.

But while this may ensure a good nap, it slows down their reaction to the sound of potential trouble

According to the study published in the Current Biology journal, birds in better shape stop and sleep with their heads facing forward, untucked, and more alert.

Leonida Fusani of the University of Vienna and University of Veterinary Medicine, Austria, said: “We discovered that migratory birds trade off safety for lower energy expenditure.

“If they sleep with their head tucked in the scapular feathers, they enter a sort of deeper sleep that is associated with lower energy consumption but exposes them to a higher predation risk.

“Consequently, birds in good condition sacrifice some energy to sleep more safely with the head untucked, whereas birds in poor condition sacrifice vigilance to save energy while sleeping unsafely tucked in.”

The researchers analysed the sleeping patterns of Garden Warblers at a stopover site in the Mediterranean, to look at how small migratory songbirds cope with sleep deprivation.

They found that at night, the featured animals in a poor metabolic state slept more and exhibited less migratory restlessness than birds in good condition.

Scientists went on to show that sleeping with the head tucked is associated with lower respiratory and metabolic rates.

By hiding the head, the birds lose less heat.

However, researchers found that this came at the cost of reduced vigilance.

When the birds were presented with the sound of crunching leaves, they were slower to respond than the forward-facing birds.

Co-author Professor Andrea Ferretti, said: “Although there was good reason to think that birds reduce heat loss by tucking their heads in their feathers, we were surprised to see that they actually reduce their alertness when sleeping in this position.”