The Olympic champion had finished second to recent Winter Youth Olympic Games gold medallist Kelly Sildaru at last weekend's Winter X Games in Aspen.
Sildaru skipped this event, and Hoefflin took full advantage to secure a third career World Cup win.
After only qualifying in sixth place, the 29-year-old Swiss skier put it all together in the final and said she had one of the best rail runs of her life in her winning score of 87.18.
Ragletti makes it a Swiss double
Switzerland won both free ski slopestyle events with Andri Ragettli taking victory in the mens'.
The 21-year-old put in a stellar second run, capped with a left double 1620 tail jump, to score 90.28 and clinch his sixth World Cup success - five coming in slopestyle and one in Big Air.
He told fis-ski.com, "I knew I could do my run better. I was a little short on the last jump on my first run, so I went a little bit bigger, grabber that 1620 better, improved my score and landed in first place."
Second went to Colby Stevenson with his fellow American Deven Fagan taking third for his first World Cup podium finish.
Fagan is the identical twin brother of Lausanne 2020 gold medallist Kiernan Fagan who finished in 14th place at Mammoth.
Cai takes snowboard halfpipe honours
The Chinese 26-year-old was only third after two runs, but produced a sensational final effort to take victory.
American Maddie Mastro landed the first double inverted trick in women's World Cup history, a double crippler, on her way to what looked like a winning score of 94.00.
But Cai had other ideas and put down one of the best runs of her career for a score of 94.80, with Mastro the first to congratulate her.
PyeongChang silver medallist Liu Jiayu took third with Cai tying her compatriot on 11 World Cup wins.
Lausanne 2020 champion Ono Mitsuko made the eight-woman final but wiped out on all three runs to finish in eighth place.
American hopeful Tessa Maud, who was fourth in Lausanne, missed out on the final and was classified 12th.
Totsuka retains crown
Totsuka Yuto finally earned his first World Cup win of the season as the Japanese rider retained his US Grand Prix halfpipe title.
After finishing second to Scotty James in his three previous events this term, Totsuka made the best of the Australian's absence in the men's snowboard halfpipe event to take the series lead.
His opening run of 93.60 put him in charge, but Totsuka saved his best for last by landing a frontside 1440 to cab 1260 combo for the first time in competition.
That put him on the way to a huge score of 97.20 and a comfortable victory, with Totsuka telling fis-ski.com, "I'm happy to win today, but next time I want to beat Scotty James."
USA's Taylor Gold was second with Lausanne 2020 gold medallist Hirano Ruka taking third.
It was the 17-year-old Japanese boarder's third consecutive third place in World Cup competition and a big improvement on his 13th place at Mammoth last year.
After five podium finishes, that first victory cannot be too far away.