Despite all of its high-tech solutions and cutting edge-technology, NASA is still struggling to get to grips with the most fundamental human failing: the need for sleep.

A study has found that highly-trained and skilled astronauts are struggling with sleep deprivation before, during and after space missions. The demands of the job and the sleep deprivation during thousands of in-flight days leave astronauts exhausted, but forced to use sleeping pills to get a restful night's sleep.

Medical experts warned that the reliance on sleeping pills could compromise safety during space flights.

Researchers at Nasa and the National Space Biomedical Research Institute in Houston, Texas, studied 64 astronauts on Space Transportations System shuttle missions or International Space Shuttle (ISS) missions between 2001 and 2011.

The astronauts wore special watches that measured their movements and how much time they spent asleep during three periods: two weeks during their training programme, three months before the mission, in the eleven days before launch, and for seven days once they had returned to earth.

They found the astronauts lost sleep in the months and days before the mission, and slept less before a mission than they did after a space mission. Astronauts on ISS missions got by on about six hours sleep a night during missions, two hours less than the eight hours a day Nasa recommends.

A shocking 78% of shuttle-mission crew members took sleeping pills on more than half of nights during the mission, and 75% of 16 ISS crew members used sleeping pills.

Laura Barger, lead researcher from the division of sleep and circadian disorders at Brigham and Women's Hospital in Boston, said: "Sleep deficiency is pervasive among crew members. More effective measures are needed to promote adequate sleep in crew members, both during training and space flight, as sleep deficiency has been associated with performance decrements in numerous laboratory and field-based studies."

"The ability for a crew member to optimally perform if awakened from sleep by an emergency alarm may be jeopardised by the use of sleep-promoting pharmaceuticals. Routine use of such medications by crew members operating spacecraft are of particular concern, given the US Federal Drug Administration warning that patients using sleeping pills should be cautioned against engaging in hazardous occupations requiring complete mental alertness or motor coordination.

"This consideration is especially important because all crew members on a given mission may be under the influence of a sleep promoting medication at the same time."

The study is published in the journal The Lancet Neurology.