In the Sacred Monkey Forest of Bali, food is everywhere and masturbation is rampant.

The thousand or so long-tailed macaques that live in this hotbed of hedonism have it really, really good.

Every day, 10,000 tourists wander through the sanctuary on their way to three local temples, feeding the monkeys as they go. Park staff also give the creatures three regular meals of fruits and vegetables.

With full bellies and little else to worry about in their little garden of Eden, these monkeys have a whole lot of time for leisure – and self-indulgence is their main game.

In recent years, male and female macaques alike have been regularly spotted rubbing and tapping stones on their genitals, leading scientists to propose a "sex toy" hypothesis.

This hypothesis holds that the stones are being used by Balinese macaques for self-directed, tool-assisted masturbation, similar to what has been seen in chimps, porcupines, dolphins, and, well, us.

Unlike our own species, however, masturbation rarely leads to actual ejaculation for other male animals. This makes it hard to determine how much pleasure the monkeys are actually receiving from stone play.

That said, male macaques do get erections when rubbing or tapping their genitals with rocks, which doesn't happen when they touch stones to other parts of their body.

What's more, female macaques are quite picky about what shape of rocks they choose for self-pleasure, which indicates they are picking those most suited to the task at hand, like ones with sharp edges (!) or a grainy texture.

"Thus," researchers conclude, "it can be confidently concluded that these actions are not incidental."

"Overall," they add, "our data partly supported the 'Sex Toy' hypothesis indicating that stone-directed tapping and rubbing onto the genital and inguinal area are sexually motivated behaviors."

The study is based on video footage in the Sacred Monkey Forest, collected by scientists in the years between 2016 and 2019.

The authors collected hundreds of examples of tool-assisted masturbation by groups of local macaques during this time period.

Most of the monkeys observed rubbing or tapping stones on their genitals happened to be male, though there was no shortage of female monkeys giving it a go.

Among nonhuman primates, female masturbation is scarcely documented. This could be due to human bias, or the fact that it's more difficult to tell when a female is sexually aroused. Or both.

It's hard to say why macaques in Bali are using stones to touch themselves, but researchers think the simplest answer is probably the right one: it feels good.

After all, these monkeys have few other pursuits.

"I think we can probably confidently say that the free time they have as a result of provisioning, it's a big explanation for [stone play]," evolutionary ecologist Camilla Cenni told Vice World News.

"But [free time] is not a sufficient explanation," she added. "I think it's only part of the story. The other part, it's hard to pinpoint because you would have to see the first [monkey] doing it."

Long-tailed macaques aren't the only non-human animals that have been caught using possible 'sex toys'.

Some animals even use other animals for sexual gratification. Male and female Japanese macaques were recently filmed jumping on the backs of deer and thrusting vigorously against their ride.

And headlines were made a few years ago when a male dolphin was caught using a dead fish for self-pleasure.

A hard, inanimate stone is a bit easier to manage. It's a tool that macaques are used to handling. Playing with rocks is a regular feature of macaque society, possibly as a way to practice for real foraging or feeding attempts.

Over time, researchers suspect this adaptive play was co-opted into a non-functional behavior that offered short-term pleasure only.

Now, macaques in Bali are using their instinctual affinity for rocks for a different sort of play. And this one is a lot more fun.

The study was published in Ethology: International Journal of Behavioral Biology.