Ever wonder how a dolphin can sleep without drowning or why a bat sleeps upside down? Well, you won’t have to wonder any more.

Check out how our favorite animals sleep below.

Dolphins

Can you sleep and swim at the same time? For dolphins, this is an easy task. They can turn off half their brain and close one eye, allowing them to be partly asleep and awake at the same time. According to an article in the Scientific American, dolphins sleep this way so they can be ready to protect themselves from predators and swim to the surface for air. ScienCentral News reports that mothers and their baby calves often don’t sleep at all for the first few months after birth.

Walruses

According to HowStuffWorks.com, walruses can sleep and swim at the same time, too. While in the water, walruses can choose between sleeping underwater or above. A walrus can hold its breath for five minutes, just enough time for a nap. For a deeper sleep, walruses inflate spaces inside their body, called pharyngeal pouches, with up to 13 gallons of air. These pouches act like a life-jacket, allowing them to remain in the water by bobbing up and down while keeping their head above for air. For the deepest sleep, walruses will either hook their tusks onto a stable piece of ice or move to land. Walruses can sleep up to 19 hours at one time. Unlike most animals, walruses do not need to sleep every day, and they can swim without stopping to sleep for more than three days.

Giraffes

Giraffes need less sleep than any other mammal. According to the Smithsonian publication, Zoogoer, giraffes sleep for five minutes at a time, adding up to an average of 30 minutes per day. Why don’t they sleep all night like other mammals? Because giraffes are considered to be a prey animal, which means that they are often hunted by other animals for food. Lying down to sleep for a long time would make it easier to get caught. According to the University of Michigan Museum of Zoology, giraffes sleep standing up with one eye open and both ears moving.

Brown Bats

While a giraffe may only sleep for minutes at a time, the little brown bat typically sleeps 12 to 19 hours without stopping. They are nocturnal creatures, which means they sleep during the day and are awake at night. Bats spend most of the day hanging upside down in small, dark crevices or with claws hooked into ceilings. Have you ever wondered why they sleep upside down? A Cornell University guide to bats notes it is because their wings are not strong enough to fly into the air from the ground. It is more efficient for bats to use gravity by dropping into flight from their perch.

Squirrels

Have you ever seen a sleeping squirrel? Most likely not because the most common squirrels, such as the grey squirrel, are tree dwelling, according to the Ohio Department of Natural Resources. This means that they make their homes high up in trees or attics. Squirrels sleep in nests called dreys that look a lot like birds’ nests. They use twigs, leaves, moss, bark, grass, paper and even dog hair to build their homes. In the winter, several squirrels will cuddle together in the drey for warmth.