Given that Frasier was a sitcom about a psychiatrist, it's perhaps surprising that it took them seven years to do an episode about the Oedipus complex, which must be the best known psychological theory around.
Being over-educated snobs, Frasier and Niles make Classical references all the time, but most are just passing mentions designed to make them look out of touch and have the other characters scratching their heads (though Frasier's description of how an ageing narcissist might come to realise the lines in the pond aren't ripples but wrinkles in 'The Perfect Guy' was rather special). There's another in this episode, reminding us that these two weren't interested in the same things as the other children, as Niles' childhood graffiti in their old cabin is revealed to say semper ubi sub ubi - the Latin words for 'always', 'where' and 'under', i.e. 'always where under where', 'always wear underwear' (though in Latin the phrase is completely meaningless).
(OK, I admit it, I spend a lot of time learning Latin and Greek for fun as a teenager. I may even have played air violin once or twice...)
Professional psychiatrists wouldn't need to know much about ancient history to know about the Oedipus complex, though. Frankly, you'd worry if they didn't know it, though I don't know how many would still subscribe to it. Freud's insistence that anything and everything was really about sex is, I hope, a bit out of date now. Anyway, Niles gives us the brief version - it's based on Sophocles' Oedipus (the King), in which Oedipus marries his mother, kills his father, and blinds himself when he finds out. Well, actually the play is just about the finding out and the blinding, but that's not the point.
This being Frasier, it's all set up so that almost as soon as Frasier has realised, thanks to some old home movies, that the woman he's dating looks exactly like his late mother, he ends up temporarily blinded with bug spray. He doesn't try to kill Martin though - no time for that in 20 minutes (and they already used up those jokes in 'Dial M for Martin'). Anyway, it's very funny. Props also to the writers for having read enough Freud to know that, as Frasier exclaims in horror, Oedipal desires are supposed to be resolved by the age of six (except in dreams, where they continue to surface, or in the case of 'neurotics'). I have no idea how accurate the psychiatry on Frasier usually is, but that bit sounded all right to my very inexpert ears.
The Oedipus complex, with its combination of fame and squick value, is usually played for horror, either the hilariously icky variety in comedy, or the fridge horror variety in more serious stuff (one of these days I'll get hold of Code 42, a rather good film I caught on telly once that went for a sort of horror-romance combination. Ish. I can't remember it very well). Frasier is a sitcom, so of course, the situation is milked for all its comedy worth, making enthusiastic use of Kelsey Grammer's ability to pull faces.
Ultimately, though, this episode does something rather more interesting and unusual than just rehash the icky aspect of the story. Freud was all about the sex and the most common reaction to the whole idea of the Oedipus complex is surely 'ew'. But there are hints throughout this episode that it's not really about wanting to have sex with your mother (ew). Martin's insistence on leaving the whole thing alone and not pointing out to Frasier how much his girlfriend looks like his mother comes from Martin's own desire to spend one more evening with a version of his dead wife. So at the conclusion, as Frasier despairs of his own mental health, Martin points out 'maybe you just miss your mother.' The episode ends with a lovely and touching scene of all three Cranes watching an old video of the late Mrs Crane together (I admit it - I welled up). In the end, Frasier's particular Oedipal problem comes not from a repressed sexual desire, but the much simpler reaction of man who misses a loved one. It's a rather lovely interpretation and an inventive use of the Oedipus complex. Surely only Frasier could go from icky mum-sex to sad-but-beautiful reality so quickly and so effectively.