It’s hard to imagine a man with four wives and 28 children craving company so badly that he takes on a mistress. But that’s the premise of Brady Udall’s uproarious new novel, “The Lonely Polygamist” (W.W. Norton, $26.95).

“It seems absurd,” the author says on the phone from his home in Boise, Idaho. “I got the idea when I was talking to some polygamist. He told me one of his friends was having an affair. I thought, ‘Why would you have an affair if you were a polygamist?’ But it’s not always about sex. It can be an escape.”

Udall is uniquely qualified to write about the special challenges of a multiple marriage.

“My great-great-grandfather was a polygamist,” he says. “His second wife was my great-great-grandmother. So, if it wasn’t for polygamy, I wouldn’t be here.”

Even back then it was not a custom that could be practiced openly.

“He was sent to prison for his beliefs and my great-great-grandmother went underground,” Udall says. “They suffered greatly for their lifestyle. They were considered criminals under the law.”

The Mormon Church disavowed polygamy in 1890, but it is still pursued sub rosa in scattered pockets around Utah, Montana, Arizona and Canada. Golden Richards, the harried protagonist of Udall’s novel, lives in such a community in the wryly named Virgin Valley of Utah.

Capturing Golden’s sprawling clan is a daunting task, and it’s but one of the signal accomplishments Udall pulls off in “The Lonely Polygamist,” which Publishers Weekly called “a serious contender for Great American Novel status.”

Despite the ease and humor of Udall’s storytelling, “The Lonely Polygamist” was a challenge to get on track.

“It took me a few years to figure it out; it took three years to write the first 100 pages and three months to write the rest,” the author says of his 602-page triumph.

Udall, who terms himself “a proud Mormon but not a practicing one,” got the idea for the book while researching an article on polygamy for Esquire magazine in 1997. The piece was originally titled “Big Love.” This was nearly a decade before the HBO series with the same name and milieu was launched.

“I started spending time with polygamists,” Udall says. “I expected them to be hardened men with slicked-back hair and the women with a bovine cast to their eyes and pioneer dresses. They drove minivans and watched TV. There was no discernible difference. Except they had 30 children.”

Udall’s own family saga seems to have emerged, generation and verse, from the Book of Mormon.

“My great-great-grandfather converted from the Church of England, crossed the Plains, and was told by Brigham Young to settle the town I grew up in, St. Johns, Ariz.,” says Udall, whose late granduncles include ’60s Interior Secretary Stewart Udall and presidential candidate Morris Udall.

It was preordained that Brady would attend Brigham Young University.

“I didn’t want to go there,” he says. “My parents said, ‘Anywhere else and you’re on your own.’ I had really good teachers, but it was difficult for the strictures. They had an honor code that prohibits drinking, premarital sex, basically everything that college students like to do.”

While enrolled at the Iowa Writers’ Workshop, Udall signed a book deal based on some short stories he had written that eventually became part of his 1997 collection, “Letting Loose the Hounds.”

His first novel, “The Miracle Life of Edgar Mint” (2001), about an orphaned Apache boy who suffers a grave childhood injury, stemmed from a college experience.

“When I was at BYU, the woman who is now my wife was what I thought of as my girlfriend,” he says. “I didn’t know she was going out with another guy.

“We went out for a drive and I asked her what was going on. She admitted she was seeing someone else. I’m a regular guy. I said, ‘Tell me all about him. I’m going to kill him.’

“She told me that when he was a kid, he was run over by a milk truck and was presumed dead. The driver had a breakdown and disappeared. The boy survived and said he wanted to track the guy down and tell him he was still alive.”

Critics have compared the book to Charles Dickens and John Irving.