Not many writing staffs get to settle in on an Amtrak train to hammer out new storylines as they head toward the destination where their series is set.

But for the writers of “Psych,” led by showrunner Steve Franks, the train ride to Santa Barbara has become the traditional way to get back to work before the crew heads off for production in Vancouver.

The efforts of Franks and his team on the cop comedy about a faux psychic and his best friend solving cases for the Santa Barbara Police Department have paid off extremely well for USA Network. During the current seventh season, “Psych” will hit the rare cable milestone of airing its 100th episode.

Starting as a companion piece to “Monk” in 2006, the series, starring James Roday, Dule Hill, Maggie Lawson, Corbin Bernsen, Timothy Omundson and Kirsten Nelson, boasts one of the most loyal audiences on television and has not only become a huge standalone success, but a launching pad for the network’s other original series.

“It’s a great show with a unique voice and a fantastic, specific sense of comedy,” says Jeff Wachtel, co-president of USA and co-head, original content, Universal Cable Productions. “It taps into a wonderful theme that will always be timely, the Peter Pan factor of a young man who won’t grow up.”

Also unusual for a long-running series, “Psych” came back this year with a 22% 18-49 ratings increase over the previous season’s premiere, which network execs attribute to a powerful multiplatform social media campaign and a six-hour, seven-episode “slumber party” marathon that aired before the premiere, as a sort of tailgate party prior to the big game.

“The marketing department has come up with great ideas of engaging the audience, like spotting the pineapple in each episode,” says Hill, who also cites a fan appreciation day in held in New York, a college tour and appearances at ComicCon, all of which have met with enormous response. “It’s become a love-fest between ‘Psych’ and its fans, the ‘Psycho-Os.’ ”

Adds USA exec marketing and digital veep Alexandra Shapiro: “We didn’t have a huge marketing budget, but we inverted the marketing paradigm and made fans advocates, which resulted in mass engagement, particularly amongst the 18-34 audience.”

“Psych” engages auds through online mystery games such as “Hashtag Killer” and its latest incarnation, “Social Sector,” in which they get to help solve cases, and through Twitter and Facebook, where the series counts more than 2.5 million fans.

“We offer relevant content that fans want and the ability to interact with their own content based on the show,” Shapiro says. “The way you interact and reward is where you get the return on investment.”

Still, success boils down to the fact that fans love the characters, their interactions and the storylines.

“At its heart, it’s about two best friends who are ‘putting one over’ on the ‘adults,’ ” says Chris McCumber, the net’s co-president. “That’s why it is still the youngest-skewing — and getting younger — show on USA.”

“I think it comes down to the banter with Shawn and Gus,” says Lawson, who plays Shawn’s girlfriend, Juliet. “Fans usually quote a Gus nickname, which is funny but a mystery. It feels like a fun game we’re playing. It’s so nice to know they pay attention, and are very specific, which is so flattering.

“Between all of the characters and relationships, everything has grown in such an authentic way, as we did in real life with each other, and our writers picked up on that.”

Show creator Steve Franks credits his father, a retired LAPD officer, as the inspiration for “Psych” — as well as ’80s-era detective shows like “Moonlighting” and “Simon & Simon.”

“I thought it would be fun to apply my comic sensibility to a cop show,” says Franks, who was best known for co-writing Adam Sandler’s “Big Daddy” (1999) when he was pitching the concept.

Although season eight is yet to be officially scheduled for 2014, bridging the seasons will be the two-hour “Psych: The Musical” airing later this year. It’s a pet project of Franks, a musician who also composed the series’ main title theme song.

“If you’re a fan of musicals, if you’re not a fan of musicals, this could be the musical for you,” Franks says about the upcoming special. “It’s comedic in its approach but soars to great heights. Everyone is talented, and there are touching, big surprises.”

Whether or not “Psych” continues beyond its next season, it’s been a joyous ride.

“I’m so grateful for the opportunity,” Franks says. “I’ll keep doing it until they push me out the door.”