First of all, the upside-down sleeping position keeps the bat's body from touching the cold rock wall, thus keeping the body warm. Also, the bat's leg strength is very small, so it can't walk, and it depends on the strength of its wings when crawling. If it lies on its stomach, it will be difficult for it to take off. So bats are usually upside down. When they are in danger, they can easily take off and escape by releasing their claws and sinking.