Dogs' sleep can be affected by stressful events just as humans' can, researchers believe.
Scientists in Hungary monitored the brain activity of 16 pet dogs, including Labradors, a Jack Russell and a sheepdog, over three hours.
In one round of tests, the dogs were subjected to brief positive experiences like playing and petting, while the next was negative and involved being separated from their owner or stared at. The dogs were then allowed to go to a sleeping place.
The researchers found the dogs tended to fall asleep more quickly after the negative experience, an apparently protective response to escape from their stressful feelings.
Dogs that experienced negative treatment also spent more time in the REM stage of sleep, when the brain is more active, meaning less time in the deeper stages.
The tests of positive and negative experiences were separated by a period of several days, depending on the dogs' availability.
Dr Anna Kis, of the Hungarian Academy of Sciences, told the Daily Mail: "In humans, stress causes difficulty falling asleep, whereas dogs fall asleep more quickly, we think as a protective measure to remove themselves from the stressful environment.
"However we found dogs get less deep sleep after a negative experience. It suggests that, just as humans have a bad night's sleep after a difficult day, dogs may have a similar problem."
The experiment also found that dogs' personalities contributed to their responses to the treatments.
"Playful dogs react to social stressors in a different way," the researchers wrote, adding that the "investigation of further individual differences, such as age or emotional reactivity, will be an important further step".
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies