Visit Japan’s Jigokudani Monkey Park in winter and you’ll see a lot of snow monkeys doing something extremely cool to stay warm. They lounge in the local hot springs. Scientists recently learned that the animals’ bathing ritual helps in another way: to relieve stress.

Researchers made the discovery after following 12 snow monkeys during the spring and the winter. They collected and tested the monkeys’ droppings for stress hormones. Animals’ bodies release these chemical messengers when they feel anxious. The scientists found fewer of the hormones when monkeys used the hot springs in the winter.

Feeling cold is stressful. That’s why sinking into a hot bath feels good—for both monkeys and humans. “Your brain gets the message that you’re safe, and your body calms down,” says Rafaela Takeshita, who led the study.