Researchers from Czech University and the University of Duisburg-Essen in Germany observed 70 dogs from 37 different breeds over the course of a two-year period.
They found that dogs preferred to excrete when their body was aligned along the north-south axis under "calm Earth's magnetic field (MF) conditions."
However, this behaviour did not occur under "unstable conditions," researchers said.
It still remains a mystery why the dogs align at all, whether they do it deliberately or for comfort.
Several mammalian species spontaneously align their body axis with respect to the Earth's magnetic field (MF) lines in diverse behavioural contexts, researchers said.
Magnetic alignment is a suitable paradigm to scan for the occurrence of magnetosensitivity across animal taxa with the heuristic potential to contribute to the understanding of the mechanism of magneto-reception and identify further functions of magneto-sensation apart from navigation, researchers said.
"With this in mind we searched for signs of magnetic alignment in dogs. We measured the direction of the body axis in 70 dogs of 37 breeds during defecation (1,893 observations) and urination (5,582 observations) over a two-year period," researchers wrote in the journal Frontiers in Zoology.
After complete sampling, researchers sorted the data according to the geomagnetic conditions prevailing during the respective sampling periods.
Relative declination and intensity changes of the MF during the respective dog walks were calculated from daily magnetograms.
Directional preferences of dogs under different MF conditions were analysed and tested by means of circular statistics.
Dogs preferred to excrete with the body being aligned along the North-south axis under calm MF conditions.
This directional behaviour was abolished under unstable MF, researchers concluded.
Since the MF is only calm for about 20 per cent of the daylight period, pet owners may have a hard time replicating the findings on their own pooch.