Genetic animals will sleep during the night (between 12541 and 23458 ticks, when stars appear in the sky). While asleep, animals will regain health as long as they are fed and their hunger will deplete slower.
If an animal is wearing a saddle or is left out in the rain or snow without shelter, it will be unable to get comfortable enough to sleep.