Just like humans, dairy cows need their sleep; but AgResearch scientists have had to get innovative with new technologies to better understand the animals' quality of shuteye.
Studying how cows sleep was one way of assessing their welfare, according to researchers.
This was important to farmers and the growing expectations of global dairy consumers.
Scientists knew sleep was an essential physiological function for all animals and played an important part in physical and mental health.
However, little was known about the sleep needs of cows.
The challenge was measuring and distinguishing between the important stages of sleep in dairy cows was impractical, with the animals housed in the usual farm environments, AgResearch animal behaviour and welfare science team leader Dr Cheryl O'Connor said.
Researchers used sensor devices placed on the cows to take measurements during their sleep - such as neck muscle activity and heart rates - to compare with the gold standard EEG (electroencephalogram) for brain activity, O'Connor said.
"We took this muscle and heart rate data from six cows in both housed and pasture systems, and applied machine learning (a branch of Artificial Intelligence) models to make predictions about what the muscle and heart rate data means for the cows' different sleep stages."
"The result was that machine learning models were able to accurately predict sleep stages from the measures that were taken, and the accuracy was in a similar range to that for human computer models."
The research was carried out by AgResearch and Scotland's Rural College in Edinburgh, including joint PhD student Laura Hunter, O'Connor said.
Since this method appeared to be a valid way of measuring and predicting the sleep stages of cows at a small scale, researchers wanted to validate it, by applying it to a much larger number of animals.
Researchers thought the insights could potentially tell them more about overall animal welfare, O'Connor said.
"From that we may be able to build further on the research. We will be aiming to share what we learn with farmers and the wider industry, so they can potentially build that knowledge into what happens on farms to provide the best life we can for our cows."
The recently published research can be viewed in full here.