Further research found this page with interesting highlights:
This is primarily a Northern European/Scandanavian myth, based in the Christmas story
This is a syncretic pagan tradition that melded with the Christmas story
I imagine that the talking animals business is somehow connected to the general "world turned upside down" idea of traditional winter solstice festivals, e.g. Twelfth Night:
In medieval and Tudor England, the Twelfth Night marked the end of a winter festival that started on All Hallows Eve — now more commonly known as Halloween. The Lord of Misrule symbolizes the world turning upside down. On this day the King and all those who were high would become the peasants and vice versa. At the beginning of the Twelfth Night festival, a cake that contained a bean was eaten. The person who found the bean would rule the feast. Midnight signaled the end of his rule and the world would return to normal. The common theme was that the normal order of things was reversed. This Lord of Misrule tradition dates back to pre-Christian European festivals such as the Celtic festival of Samhain and the Ancient Roman festival of Saturnalia.
True to the "magnificat" animals get the upper hand, and humans often do not like what they hear. It is often used as a lesson to be kind to those lesser than themselves.
It apparently works from sunset until midnight, although some variations put it at once every hundred years.