Early-morning sluggishness, or the havoc wrecked by jet lag - it's all down to your circadian rhythm. But how does your biological timekeeping actually work? It turns out that nearly every cell in the human body keeps time by its own means. From your hair cells and skin to your muscles and even kidneys, there are trillions of cellular clocks everywhere in the body.

In most organisms, the circadian rhythm has a roughly 24-hour period, thanks to the planet we've all evolved on. You know that your circadian rhythms respond to the cycle of light and dark, but that's only the external input. When it comes to translating a sunny morning into feeling alert, that input needs to be registered by the master clock in the brain. Here, in the hypothalamus, right above the crossing of your two optical nerves, lies a tiny patch of about 20,000 neurons called the suprachiasmatic nucleus. 

For a long time it was thought this is where the biological clock is located. However, it turns out that the brain only contains the circadian rhythm central, from which hormonal signals travel all over the body, synchronising the cells to the day-night cycle. Individual cells have their own little clocks that keep time locally, making sure enzymes are produced, blood pressure is under control, cells are dividing, and so on.

This biological timekeeping is actually a genetic process, and we share it with many bacteria, plants, animals, and even fungi. At a cellular level we have a range of 'clock genes' that code for clock proteins - daily interactions between them causes protein level fluctuations in the cell, in turn influencing cell activity.

Because the centralised clock keeps everything in sync, sometimes you get random bouts of hunger when jet-lagged, because the 'local stomach clock' is disconnected from the brain for a few days, until the whole system realigns again.

"Almost every cell in our body has a circadian clock," Salk Institute circadian researcher Satchin Panda told Veronique Greenwood at Quanta Magazine. "It helps every cell figure out when to use energy, when to rest, when to repair DNA, or to replicate DNA."

One vivid example is hair cells - in 2013 Panda and his colleagues discovered that mouse hair grows fast in the morning, and slows down at night, when it repairs cell damage instead. They hypothesised that this has real implications for cancer patients who receive radiotherapy - if they are treated in the morning, that's when cells are not repairing, which leads to hair loss.

"While we don't yet know if human hair follows that same clock we found in mice hair, it is true that facial hair in men grows during the day, resulting in the proverbial 5 o'clock shadow. There is no 5am shadow if you shave at night," says Panda.

There are other uses for our knowledge of clock genes. Some of them regulate cell death and proliferation, two processes that are disrupted in cancer tissue - where clock genes and proteins don't seem to be present.

Studying our cellular clocks can also help us understand how to align hormonal medication to a patient's circadian rhythm, the best ways to treat jet lag or sleep disorders, and even explain why older people have disrupted sleep patterns - it could be that their central clock gets out of sync with the rest of the body. Cellular clocks are nearly everywhere for a good reason - without these little genetic mechanisms your body would be a hot mess.