Autumn can be wonderful: bright, crisp days with brilliant blue skies, leaves in colours that lift the spirit, hedges glistening with jewel-like hips and haws. For wild animals, food is plentiful. But danger lies ahead, and many won't make it through the winter. If they are to have even a chance of survival, they must adapt.

One way of dealing with colder weather is to alter one's behaviour: honey bees huddle together in their hives, and birds flock together to reduce heat loss. Almost half of the bird species that breed in Britain leave for the winter, sometimes travelling prodigious distances. The Arctic tern completes a round trip of 32,000km; swallows, which have already deserted us, will now be sunning themselves in the southern tip of Africa. But physiological changes are frequently involved. All the travellers need to store fat to fuel their journey, and many have other tricks: the bar-tailed godwit shrinks its internal organs (as the scientist who discovered this says, "Guts don't fly"), while other species allow their body temperature to fall by up to a third during the night in order to consume less energy.

The American wood frog undergoes an even more dramatic transformation. At first this amphibian deals with the cooler days by burying itself in the soil. Then, as the temperature continues to drop, the glycogen that is stored in its liver is converted to glucose, which floods the frog's cells, lowering the freezing point of the liquid in its body. This "supercooling" prevents ice crystals from forming and rupturing internal organs.

Meanwhile, mammals that are about to hibernate, such as bats and badgers, build up food reserves and store them as brown fat, which can generate prodigious amounts of heat rapidly. As they enter hibernation, their temperature drops but is carefully maintained, using their fat reserves, at just above the ambient temperature.

How do natural variations such as the changing day length make such profound alterations to physiology and behaviour? All organisms have to respond to and anticipate change, and the way they do this is by using their bodies' "circadian clock", which, in effect, allows everything from a bacterium to a bat to "know" what time of day it is. This clock governs when an animal eats, sleeps and reproduces: it is hard to overstate how important it is at helping animals adapt to changing conditions throughout the seasons. In humans, our clocks are responsible for the rise and fall of our core body temperature, and our sleep-wake cycle, as well as many physiological, emotional, cognitive and behavioural functions.

Circadian rhythms (the term comes from the Latin for "about a day") were first noticed in plants in 350BC by a centurion in Alexander the Great's army. He observed that, at night, a plant's leaves drooped next to the sides of the stem but in the morning they rose as if to worship the sun. In fact, this is an innate response, called the "sleep movement", that even occurs in the absence of sunlight.

In the early 1900s scientists found that animals have circadian rhythms, too: they also are capable of maintaining a 24-hour-long activity pattern in the absence of external cues such as light. In mammals the main "clock" is located in a part of the brain known as the suprachiasmatic nucleus, or SCN. Its mechanism is so strong that you can remove the cells and keep them in a culture and they'll still maintain a 24-hour rhythm. In normal circumstances, however, the SCN reacts to the lengthening nights by instructing the brain's pineal gland to secrete more of the hormone called melatonin. It is melatonin that triggers many of the changes needed for animals to adapt to winter - and it also plays an important part in sleep.

We humans like to think of ourselves as somehow outside the natural world, but we have a circadian clock as well. In the 1970s scientists studied students housed in second world war bunkers in Leipzig, Germany. The students remained in the bunkers for between two and four weeks at constant light levels and were not allowed watches or to have naps. Most eventually settled into a regular routine just slightly longer than 24 hours. "This biological clock has a very powerful effect on us," says Professor Jim Horne, director of Loughborough University's sleep research centre. Shift workers, he says, "regularly have a tough time dealing with the period between 2am and 4am."

What is less clear is the relationship to seasonal affective disorder, or Sad. Those who suffer from Sad report feeling depressed and lethargic as the days grow darker; they have disrupted sleep patterns, crave sweets and go off sex. Horne is sceptical: "People tend to get more miserable, but this isn't necessarily because of circadian changes but because it's the end of summer and they feel a bit downhearted that winter is coming, with all the trials and tribulations that brings." Yet the American Psychiatric Association's Diagnostic and Statistical Manual of Mental Disorders lists Sad under mood disorders with seasonal patterns.

One theory about Sad is that sufferers do not get enough light in winter to halt melatonin production, and this disturbs their sleep and appetite. The standard treatment is to use bright light with a blue tinge to reset the body clock. Early studies suggested that light exposure for three hours at the beginning and end of the day was needed, but more recent research has shown that single, intense, daily pulses are as effective. Horne has his doubts about such treatment, citing a possible placebo effect. "The more expensive and arduous or bizarre the treatment is," he says, "the more there's a psychological element to it."

Other treatments that are less widely used but can be effective are taking the anti-depressant Prozac, which boosts serotonin levels, or, along with light pulses in the morning, doses of melatonin in the evening. But whether we have Sad or merely feel it, if migration is not an option, it seems that the best way to deal with winter is to try to get outside during daylight hours as much as possible.