Joey from Friends never started out an idiot. He started as a smart guy giving normal advice but at some point, the writers decided to change his personality.
Can we pinpoint the exact episode when Joey's intelligence went down?
Maybe not very often but Joey was stupid since the first season. In Season 1, Episode 4 "The One With George Stephanopoulos":
Monica: Hey, Joey, what would you do if you were omnipotent?
Joey: Probably kill myself!
Monica: ..Excuse me?
Joey: Hey, if Little Joey's dead, then I got no reason to live!
Ross: Joey, uh- OMnipotent.
Joey: You are? Ross, I'm sorry...
And in Season 3, Episode 1 "The One with the Princess Leia Fantasy", Joey is watching Wheel of fortune and says Count Rushmore. Chandler says there is no Count Rushmore. Then who painted the faces in the mountain, says Joey.
He has been late in getting the point from the beginning. the first clue is in Season 1, episode 2 opening when They're talking about kissing being as important as the other parts of sex and after discussing, Joey gets confused and asks: "Are we still talking about sex?"
Chandler: Yeah, I think for us, kissing is pretty much like an opening act, y'know? I mean it's like the stand-up comedian you have to sit through before Pink Floyd comes out.
Ross: Yeah, and-and it's not that we don't like the comedian, it's that-that... that's not why we bought the ticket.
Chandler: The problem is, though, after the concert's over, no matter how great the show was, you girls are always looking for the comedian again, y'know? I mean, we're in the car, we're fighting traffic... basically just trying to stay awake.
Rachel: Yeah, well, word of advice: Bring back the comedian. Otherwise next time you're gonna find yourself sitting at home, listening to that album alone.
Joey: (pause)....Are we still talking about sex?
I've narrowed it down to Season 3, episode 8 (The One with the Giant Poking Device).
Before that point, Joey is relatively witty, betrays no obvious confusion about what's happening in his life and is mostly characterised as being something of a man's man, heavily into sports and food.
After Season 3, Episode 7 (The One with the Racecar Bed), the writers seem to have decided to change his character entirely. From that point onwards, he's an idiot. Although he still makes the occasional sharp comment, at least half of his lines from then on are intended to show that he's as thick as two short planks (such as not knowing who Charles Dickens is, doesn't recognise that Homo Sapiens are people, etc).
As regards the in-universe event that caused this dramatic personality change, at the end of Season 3, Episode 7 he encounters Janice kissing the Mattress King. My personal (and not entirely serious) interpretation is that it would appear that the shock of this, along with unresolved issues about his own father's affair caused him to suffer a psychotic break.