Songs that drone on and on aren’t always a bad thing.

Music lovers are increasingly gravitating toward ambient music — the atmospheric and often repetitive niche genre favored by audio nerds — and attending concerts that go on for many hours.

Adventurous New Yorker concertgoers had the choice of two marathon-length concerts last weekend for tuning in and dropping out: a 10-hour ambient music show in Bushwick, and an even more demanding 24-hour drone-music event held in a reclaimed factory in Hudson, NY.

At 24-Hour Drone, about 300 people camped out on a concrete floor to listen to a full day’s worth of music from nearly 30 performers as varied as Sonic Youth co-founder Lee Ranaldo to the Karma Triyana Dharmachakra Choir, which sang Tibetan Buddhist chants.

Why would anyone do this? Often, it’s to get away from the hectic pace of modern life.

“There’s some sort of a 21st-century New Age phenomena going on where the world is burning and politics are f–king evil and people need peace,” Melissa Auf der Maur, co-founder of Basilica Hudson, which put on the 24-Hour Drone event, tells The Post.

“The power of sound to bring frequencies inside and out together is hands down our most ancient force of connectivity,” adds Auf der Maur, who formerly played bass in the rock bands Hole and the Smashing Pumpkins.

While it won’t ever be as popular as, say, Beyoncé, there’s growing interest in the genre.

In January, the amount of ambient music streamed on Spotify reached an all-time high — about 60 percent higher than it was two years ago, according to the company.

The term “ambient music” was coined by musician Brian Eno in the late 1970s as a kind of anti-Muzak — soothing background music that was still interesting to listen to.

“Ambient Music is intended to induce calm and a space to think,” he wrote in the liner notes of his influential 1978 album, “Ambient 1: Music For Airports.”

The sounds are similar to ancient music, says Kenneth Aigen, an associate professor of music therapy at New York University.

“If you look at shamanic uses of music that put people in trance states, it’s all extremely repetitive,” Aigen says. “The repetition creates a container, something in which we can enter that moves us internally.”

But it does little to inspire external movement, and fans say that’s part of the appeal.

“You can use it for mindfulness,” says Brian Gray, a 36-year-old who lives in Hudson and attended the 24-Hour Drone event. “Rarely have I been to a concert where everybody is laying down the whole time.”