For most people, a Sunday morning routine involves wearily making coffee, stumbling out to brunch and trying to shake off the aftereffects of last night’s party.

But back in the early ’80s, for some hard-core fans of freestyle music, Sunday morning was time to go back to the club. “I used to DJ from 10 p.m. on a Saturday night through to noon on Sunday,” explains John “Jellybean” Benitez, who was the resident DJ at the Fun House from 1981 to 1984. (Another claim to fame: he was engaged to Madonna.)

That club was where “freestyle” blossomed and found its young audience. “They were saying disco was dead, but there were still millions of people going out on the weekend and listening to dance music.”

On Friday, May 13, freestyle music is being fêted at Capitale, with the help of Benitez, DJ Louie Vega (of short-lived Bronx club the Devil’s Nest) and more as part of the monthlong Red Bull Music Academy Festival. Just don’t turn up at breakfast, because modern New York City liquor-licensing laws mean that these days, the fun ends at a positively Puritan 4 a.m.

The origin of the term is unclear, but freestyle began in The Bronx (where Benitez was also born), and was a fully synthesized form of music that evolved from early hip-hop. It also helped scratch the itch of fans wanting to dance to something other than the overplayed disco hits of the late ’70s. Benitez (now 58) also notes that the influence of boogaloo music helped attract a huge fan base in New York City’s Latin community.

At the Fun House (a 28,000-square-foot space that was located at 526 W. 26th St.), Benitez spun underground records such as “Walking on Sunshine” by Rockers Revenge and Shannon’s “Let the Music Play,” which hit the Billboard Hot 100 in 1984. The DJ booth was inside the mouth of a giant, grinning clown’s head; if revelers needed a break, they could take five to play arcade games that were also inside the vast club.

One of the best documentations of that era is New Order’s 1983 video for their freestyle-influenced single “Confusion,” which captures the British band working on the track with dance producer Arthur Baker before heading to the Fun House to play the song to clubbers. As the group rolls up to the venue, it’s already dawn, but the party is still going hard inside. “It was very common for us to play works in progress and test them out on the crowd like that,” remembers Benitez, who is depicted in the famous DJ booth with the band, watching the crowd’s reaction.

“It was quite like a youth club inside, not like a normal, dingy nightclub,” remembers Peter Hook, a former bassist for New Order. “For the clubbers at least, there were no drugs. It was all about the dancing and the peacocking.”

New Order were so enthralled by the culture of the Fun House (and several other American clubs of that era) that they, along with their label and management, attempted to re-create it with their own club — the Haçienda, in Manchester, England (as portrayed in the 2002 movie “24 Hour Party People”).

While Studio 54 catered to the uptown crowd, the Fun House and its freestyle music represented the sound of the street. But sometimes A-listers would poke their heads in to see what the fuss was all about. “Paul Simon and Penny Marshall came by one night,” Benitez recalls. “Another time Sylvester Stallone and John Travolta were there, and the whole place went nuts. People were following them around the club and, eventually, they had to come up to the DJ booth!”

But it was one of the club’s regulars — who was, at the time, Benitez’s girlfriend — who ended up taking the sound of freestyle to a broader audience. “Madonna was very plugged in to the dance scene,” says Benitez, and he, in turn, helped channel her influences into the wider world, producing and remixing several songs from her 1983 self-titled debut, including her breakout hit “Holiday.” They were even engaged for a time, but the relationship didn’t withstand Madonna’s skyrocketing fame, and the two split in 1985 (coincidentally, the same year the Fun House closed).

Benitez had his own flush of mainstream fame. As well as remixing everyone from Whitney Houston to Huey Lewis and the News, Benitez scored hits of his own, including 1984’s “Sidewalk Talk” and, most notably, 1987’s “Who Found Who” (featuring vocalist Elisa Fiorillo). But he inadvertently scored big by writing the theme tune to “Ricki Lake,” which dominated the talk-show scene during the early ’90s.

“I saw Ricki in a club in Los Angeles and she asked if I’d be interested,” explains Benitez. “I had built up this big body of work, but when Ricki’s show blew up, that’s all anyone asked about! I couldn’t believe that people even knew it was me because the credits used to roll by so fast. I thought I was the only one who read those — but I was wrong!”