When the writer and artist Margarita Gokun Silver had her first migraine after she turned 40, the pain was so bad she vomited before lying in bed, completely incapacitated for the rest of the day.

Over-the-counter painkillers didn’t work. Her doctor, who assured her there was no underlying cause for her migraines, gave her expensive pain medication to try, but it left her with debilitating nausea. After trying a variety of other therapies—ranging from yoga to Canadian painkillers to Botox—she finally settled on acupuncture. It was the one thing that worked, she recently wrote in the Washington Post.

Acupuncture—the act of sticking tiny needles into different parts of the body to try to relieve pain elsewhere—is based on Chinese medicine from over 2000 years ago. In Chinese tradition, acupuncture helps realign the body’s qi (pronounced ‘chee’), which is the energy that flows through various parts of your bodies. It was assumed that when you were in discomfort, either as a result of pain or nausea, your body’s qi was misaligned; the tiny needles, sometimes augmented with heat or electricity, could help realign that energy, with the minor side effects of possibly a little on-site pain and light bleeding.

Although acupuncture was mostly abandoned between the 18th to 20th centuries, it was still practiced informally by Chinese traditionalists. It caught the attention of Westerners when, in 1971, the treatment was provided for a New York Times journalist in Peking, who later wrote (pdf) about the experience.

Now, there’s increasing evidence that acupuncture works. Last month, a meta-review of 12 clinical trials found that acupuncture is a moderately effective treatment for chronic tension headaches, presumably similar to the migraines Silver experienced.

But how does it help?

No one is really sure. In 2014, researchers at Rutgers found that when mice were given (pdf) acupuncture with electricity flowing through the needles, they produced less of an harmful inflammatory response; some scientists believe that the needles stimulate the production of healthy chemicals in our bodies.

“One major hypothesis is that acupuncture works through neurohormonal pathways,” Ting Bao, an integrative oncologist at Memorial Sloan-Kettering Cancer, told Live Science. “Basically, you put the needle through specific points in the body and stimulate the nerve. The nerve actually sends signals to the brain, and the brain releases neural hormones such as beta-endorphins.” With these extra hormones, he explained, a patient may feel less pain than they did previously. He also postulated that the tiny needles promote nerve growth and regeneration to alleviate pain.

Much of the evidence has yet to be tested, and some scientists remain skeptical. “Acupuncture does not work, which means all discussions of how it does work are irrelevant,” David Colquhoun, a pharmacologist and neurologist at University College London, told Scientific American. Although there are claims that acupuncture can be effective treatment for depression, pain during cancer treatment, and other forms of chronic pain, the evidence is more limited—and possibly even biased, according to another systematic review.

For patients with chronic pain, acupuncture probably won’t hurt—if you can afford it. In the US, with 18,000 licensed acupuncturists (the majority of them are in California and New York), treatments cost about $125 each (though this may vary with insurance). Silver felt better after eight 30-minute treatments over the course of a month.

If anything, acupuncture can provide a chance for some peace and quiet. ”I know that in addition to healing my body with needles, I also get a whole half-hour when I only think of good things,” Silver wrote.