Animals have been making babies for as long as there have been animals, but calendars were invented relatively recently in the history of life on Earth. How did all those generations of creatures, and the ones today that never learned how to use an agenda book, know when it was time to mate and reproduce?

Researchers from the University of Bristol suggest that the amount of the sleep hormone melatonin released during the night tells animals when to make baby animals. Their study of sheep, published in the Proceedings of the National Academy of Sciences, showed that the duration of those melatonin secretions had an effect on how much of a certain protein the sheep’s pituitary gland would release. Variations of that protein, known as vascular endothelial growth factor, control reproductive cycles and other bodily functions.

Read: Elephants Will Sleep When They’re Dead

In the case of reproduction, the protein from the pituitary gland is a messenger, telling the pituitary to “produce hormones that control seasonal fertility, which are located in a different part of the gland,” researcher Dr. Domingo Tortonese said in a statement from the University of Bristol.

sheep-1642874_1920 How do sheep know when it's time to mate and have babies? Melatonin, a sleep hormone also found in humans, might have something to do with how they measure time. Photo: Pixabay, public domain

In addition to understanding more about how animals function, the university says the findings could serve farmers as well as “have an impact in human medicine.”

Melatonin, which signals the different parts of the body that it is time to sleep, is a hormone humans also produce naturally in their brains, although some ingest additional amounts in a supplement form to promote snoozing. Does the recent finding about the link between melatonin levels and fertility in sheep mean that women can boost their fertility by regulating their melatonin levels? It’s not a new concept.

Read: Birth Control Works for Monkeys

The Hormone Health Network notes that it is “possible for very large doses of melatonin to affect human reproduction,” and there have been medical articles that investigate the idea, such as a 2014 study from the Journal of Ovarian Research that suggested melatonin supplements could be used to make in-vitro fertilization more successful. The whole nature of the relationship between melatonin and the human reproductive system, however, remains a mystery to be uncovered.

See also:

7 Surprising Animal Friendships Between Species

Why Are Pandas Black and White?