Galifianakis explained that Palin's seemingly overnight rise to national prominence in 2008 helped him with his portrayal of inexperienced candidate Marty Huggins.
"There are several people that have been on the national stage that we borrowed from for sure," he told Reuters. "I think the most prevalent example is the Sarah Palin aspect where - and I don't blame Sarah Palin, I blame it on the human ego - when somebody chooses you to do something, you start believing."
The actor added: "If I got hand-picked to do something or was told I was really good at something, I would want to believe it because it sounds nice."
Galifianakis went on to joke that he actually does identify with Palin's rise to international fame.
"I've never thought I was qualified for anything. But the last couple of years people think I'm qualified to act in movies, so I'm running with it," he quipped.
Galifianakis's The Campaign co-star Will Ferrell recently revealed that he based his character's perfectly coiffed hairstyle on disgraced politician John Edwards.
The Campaign is now playing in the US and opens in UK cinemas on September 28.
Watch a trailer for The Campaign below: