Ace Attorney has a number of these characters, to the point where your average ditz nearly always is smarter than they look.
In the original game, the supposedly beyond-senile Yanni Yogi (a Shout-Out to Yami Yugi) faked permanent brain damage for fifteen years before trying to exact revenge and get away with it.
Case 5, in the DS remake, has Police Chief Gant. His guise of a lovable, laughing buffoon hides not only a razor-sharp mind, but his true personality of a ruthless genius willing to kill one of his own officers, and blackmail another by framing her sister, in order to put away a serial killer.
In Justice For All, Ini Miney from case 2 and Matt Engarde from case 4 are both smarter (and more sinister) than they appear to be at first glance.
In Apollo Justice: Ace Attorney, Phoenix Wright himself shows a bit of this trope.
Done in Ace Attorney Investigations with the ditzy bubble-blowing Cammy Meale, the jovial Ernest Amano, and the elderly Quercus Alba. They're all murderers or accessories to murders, and all work in the same smuggling ring. Since veteran players of the series will know to look for the trope, the game even plays with your head a little with the delightful, energetic, and oblivious Colias Palaeno—who never even comes under suspicion.
And in the sequel, Gyakuten Kenji 2 (AKA Ace Attorney Investigations: Prosecutor's Path) we have Sōta Sarushiro (Simon Keyes in the English Fan Translation), a shy and meek individual Edgeworth defends in the second case. In the climax, The Reveal kicks in and it turns out he's actually the brilliant and cruel mastermind behind the main events of the game.
From Dual Destinies we have detective Fulbright (aptly nicknamed Fool Bright by prosecutor Blackquill). For most of the game he looks like a regular detective who strongly believes in justice, and makes sure you know it. It turns out he is actually a spy who killed the real Fulbright, Metis Cykes (Athena's mother) and Clay Terran. He can also hide and pretend emotions (almost) perfectly.
When Raven joins your party in Tales of Vesperia, he presents himself as a goofy but skilled middle-aged Handsome Lech who imparts nuggets of wisdom that no-one asked for and constantly complains about how he can't keep up with the other, much more youthful party members. In fact, he's The Mole for the local Smug Snake. His true identity is that of a cunning, experienced and suave knight who, under his "Raven" persona, managed to infiltrate the highest levels of the Dahngrest government over ten years.
The entire Team Fortress 2 team, all of whom the Announcer refers to as having "below average" intelligence, outside the attack classes, could count. Demoman seems like a friendly, reasonable guy when he's not drunk, based on the War update comic, and it's hard to be stupid and make five million dollars in one year. Heavy has a Ph.D. in Russian literature, and if the Russian "Meet The Heavy" is any clue, is much more eloquent in his native language. Engineer has 11 "hard science" Ph.D.s, which speaks for itself. "Meet The Medic" revealed Medic is indeed a trained doctor, though he's barking mad and he lost his license for stealing a patient's skeleton. Sniper managed to rig a tribal shield to electrify its attackers, and while not as smart as the rest, doesn't seem "below average." Spy had the resources, intelligence, contacts, and capability to thoroughly research a "Your Mom" joke, in addition to being able to do a spot-on impression of the voice of all eight other team members, and seeming like a completely civil, intelligent gentleman off the battlefield. Below average, indeed.
Pyro could be too, as most of when he/she's trying to speak under the mask sounds somewhat condescending.
A later "Meet the Pyro" video revealed that the (s)he is utterly insane and views the world as a happy, colourful place where (s)he skips around dishing out lollipops and rainbows to adorable cherubs, when in reality (s)he is causing pain and suffering by shooting gouts of searing flame at his/her enemies. Since (s)he has such a warped view of reality the smart/dumb scale doesn't really apply to him/her.
In the new online comics series, it is show that when not being a mercenary, Pyro is a successful businessperson, being responsible for a company's "best quarter ever," thanks to their new CEO, Pyro. He still sees everything as a cartoon and still only hears gibberish, though.
Levin from Soul Nomad & the World Eaters appears to be a complete idiot...up to the point where he stabs your Old Master dead out of the blue and reveals he's the last world eater; he's helped you because you've been killing off — or given him an opening to kill — everyone who was ever a challenge to his future bid for godhood, and every single time he left the party to wander around and came running back dragging trouble behind him, he did it entirely on purpose.
Resident hungry ghost Yuyuko Saigyouji, of Touhou, definitely fits the bill. It's even a possibility she's actually even smarter than The Chessmaster Yukari.
During her appearance in Imperishable Night she keeps talking about the incident-solving as a "wonderful midnight snack tour across the land" and have an overall very carefree attitude towards the whole thing. But if you look at her dialogue carefully, it's very much implied she already figured out everything beforehand, and each "dish" is a metaphor for every enemy they're facing.
She continues this in Ten Desires. After picking a fight with the player character for no real reason, she then quickly points them out to the right direction despite never actually leaving her mansion.
Moriya Suwako fits the bill as well. She looks and behaves like a Cheerful Child but is actually a Physical Godwell over2000 years old. It's been all but stated outright that her childishness is an act and her appearance might very well be a shape she has assumed to make her act more convincing.
In the Sinnoh region of the main Pokémon games, Dr. Footprint can essentially read Pokemon's minds. Some of the more slow or dumb Pokemon will express simple thoughts full of "hnurr" pauses - except when they suddenly share a complex and grammatically correct sentence or two about how people and other Pokemon assume that they don't think much because they don't speak up often. They don't seem annoyed or insulted though.
Shuji Ikutsuki relies heavily on this to fool Persona 3's protagonists into bringing about the Fall for him. A harmless character known for bad jokes becomes The Chessmaster in one fell swoop..
And in Persona 4, Adachi plays much the same role. People who have played Persona 3 will probably be instantly suspicious towards him because of it.
Adachi plays like more of a subversion of the trope. While they do successfully obfuscate their real personality from others and are implied to be fairly intelligent, they mostly stumbled into the plot without any real planning or cunning on their part. In fact, their direct involvement is what ultimately gives them away. What they're really obfuscating is their morbid curiosity and sheer disregard for others, which they've twisted into believing is some sort of deep revelation.
Dark Adonis aka Midboss and Seraph Lamington from Disgaea: Hour of Darkness. The first appears to be a foppish Recurring Boss whose sole purpose in the story is to get his ass kicked by Laharl. The second appears to be a hands-off sort of boss content to just walk around his garden while his subordinate plans a coup to conquer reality. In the end, it turns out Lamington was aware of everything all along. In addition, the entire game is essentially a Secret Test of Character masterminded by Lamington and Midboss to make Laharl a great and compassionate Overlord. Midboss is also heavily implied in the end to be the temporarily reincarnated form of Laharl's father the previous Overlord.
Asmodeus from Painkiller, an easy-going imp who followed Daniel around for most of the game only to reveal that he was Lucifer himself, digging holes to allow demons into Purgatory from Hell.
He's smart enough to have conquered half of the world in his ending at the very least.
Knox Harrington in Vampire: The Masquerade – Bloodlines first appears as a vampire's excitable, none-too-bright servant who's gotten in over his head while following a target and needs the player character's help. Turns out with the right questions and mental stats (or Malkavian insight) that he's actually a competent former bounty hunter and his job all along was to get your character to go after the target.
Double from Mega Man X 4 is a portly rookie Maverick Hunter, who is shown falling over at times in the game's FMV. Despite his goofy appearance and clumsiness, he is actually a fiercely powerful reploid in a fake body
No One Lives Forever has a recurring character - a drunk who shows up in virtually every level, acting like an idiot. He even somehow shows up on an enemy space station, presumably just for the gag...but a post-credit sequence reveals that the idiot is actually the leader of HARM, the evil organization, spying on you personally
The main character of Devil Survivor has some decidedly ditzy dialogue options (especially: "What's 0+2?"), but generally seems to figure things out much faster than he lets on. He even gets called out on it in one of the Multiple Endings.
It gets Lampshaded earlier than that, too. In the game's prologue, during a brief meeting with Naoya, the main character has the option to guess that the Laplace Mail is predicting the future. Naoya is amazed — not just because that's correct, but because it's a downright bizarre and even somewhat stupid conclusion to draw from the current evidence.
In The Force Unleashed, after losing his eyes, Rahm Kota becomes so depressed that he spends all his time binge-drinking and claims that he has lost his connection to The Force. It eventually proves that he is still a mighty Jedi Knight, like when he steals Emperor Palpatine's lightsaber.
Though, then again, that happened AFTER his He's Back moment.
Played straight and averted in Arcanum: Of Steamworks & Magick Obscura. In the Museum of Oddities in Tarant there is an exhibition of Gar, "world's most intelligent Orc". It turns out that Gar is actually a full-bred Human with a strange mutation and just pretends to be stupid, because people wouldn't put up with an Orc smarter than themselves.
It's very debatable as to whether Space Quests Roger Wilco is a lucky Idiot Hero or brighter than he looks and just very unmotivated. The Big Bad of the sixth and final game muses about this and concludes it's some of both.
Gaston in Luminous Arc 2 is such a Large Ham his overacting gets questioned by other characters in the game on occasion, but has a very real, very sensible code of honor and duty to the Queen, and is a legitimately skilled Knight Commander, preferring to lead from the front line.
In Dragon Age II the Hawke's "sarcastic"-choice dialogue indicates that personality type uses this and Buffy Speak seemingly as a tactic to lure enemies into a false sense of security, before revealing that their title of "Champion of Kirkwall" is very much deserved and they really are that dangerous. Cue many an Oh Crap! moment from their enemy.
Sarcastic!Hawke: Oh I'd make a terrible slave. For one thing, I talk too much.
[pulls a knife out thin air and holds it to the slaver's throat]
Sarcastic!Hawke: Plus, I do that.
In the original Dragon Age, take a shot every time someone mentions the old saying that Mabari are clever enough to speak and wise enough not to.
When reminded in the endgame that the other Wardens will have questions about the Archdemon and why both Wardensmade it out, Alistair cheerfully replies that "I can shrug and look stupid. It's a talent." (Alistair himself—despite what Morrigan insists—has a decent education as a Templar and is a competent soldier, and if he's hardened and made king, he does better at ruling than Anora (well, most people) imagined.)
In RuneScape, there's an NPC near the Barrows Brothers who is only known as the Strange Old Man. Normally, he just acts like a useless idiot who won't tell you a damn thing. But during the quest "The Temple at Senntisten, the Strange Old Man becomes a lot more lucid, a lot more direct, and a lot less weird.
Player Character: But I thought you were just some mad old bloke with a spade obsession.
Strange Old Man: I do my best to look useless. If only others knew the truth, it would chill their hearts.
Letho, the Kingslayer, from The Witcher 2. He's a big, hulking mountain of muscle who really doesn't look very smart and he uses this to his advantage like a true Magnificent Bastard as he manipulates the Scoia'tel and the Lodge of Sorceresses to aid him in slaying kings under the pretense that it would aid their own ends, when his actual goal is to make the Northern kingdoms descend into chaos so the Nilfgaardian empire could easily invade them:
Sile de Tanserville: Letho played us all! We were decieved by his dull face and sluggish stare.
Little Busters! has Kyousuke and Masato. Kyousuke is naturally silly and childish, but Refrain reveals that sometimes he was acting that way to throw Riki off from considering his true motives by pretending he was just acting on his own whims. Likewise, Masato is kind of a Dumb Muscle, but he dutifully followed the script Kyousuke set for him to continue to act that way and pretend not to know anything Kyousuke was doing so as to uphold the world and keep Riki at ease.
Mad Father: Aya, concerning her father's experiments (at least at a young age).
Aya (in narration): I feigned ignorance the whole time. Because I loved father.
In Super Robot Wars UX, Richard takes up a foreigner act and starts talking mixture of easy words from languages to pretend he's not a serious mercenary when he's on cover missions with Saya, Agnes is completely fooled by this and thinks they are comedians (comic story tellers).
Tears to Tiara 2: Hamil pretends to be a dumb, unambitious youth lacking any sword skills, magic powers, or will to avenge his father or frees his people. He did this for seven years to prevent a rebellion by the Barcid Party for as long as he could, and at the same time save up enough magic to give Melqart enough power to defeat the imperial army if the rebellion does occur. He throws off the disguise to save Tarte.
Neverwinter Nights' Hordes of the Underdark expansion has an ogre mage who lives in Undermountain. He speaks very eloquently and has above-average intelligence, but enjoys playing up what he describes as 'the "Me smash you good!" stereotype' of ogres when in combat because it makes his opponents underestimate him.
The final boss of MadWorld is the one character you spend the game thinking you'll never meet in person, pure comic relief: The Black Baron, the guy who keeps getting killed to show off Bloodbath Challenges. Not only is the Baron the final boss, but it quickly becomes clear that they earned the spot.
Temmies from Undertale are an entire race of cheerful dolts named Temmie with terrible language skills (aside from Bob). The Temmie in the shop, however, will suddenly speak perfect, stern English if you anger her.
Temmie: Is this a joke? Are you having a chuckle? Ha ha, very funny. I'm the one with the degree.
In a more plot-relevant way, SANS. This character looks like its purpose is slapstick comic relief, seemingly anywhere to pull off another gag. But if you pay attention, the game drops hints that he's a quantum physicist that can alter the timeline to appear in multiple places at once, secretly monitoring and judging the player's progress. However, despite knowing the player is the anomaly that causes various timelines to branch apart and abruptly end, he's ultimately powerless. That's why he's lazy; he knows everything will just get reset again. And Lord help you if you act so monstrously that he decides he has to care again.