That was a pretty good scene and the secondary theme of the episode. (The main theme was the much anticipated kiss between Ally and Ling.) What happens is that John overhears part of a conversation where Nelle tells Ling about her fantasies of being spanked.
Even though he has no particular inclination himself, he is convinced that he ought to fulfill her desires for her. So he and Fish go on the internet where they "learn" that 30 per cent of all women fantasize about being spanked (!!) and that a woman who brushes her hair in bed-- something Nelle does frequently-- really wants to get it with the hairbrush (!!!!).
That night, as John and Nelle are in bed together, and she's brushing away, he tricks her into climbing across his lap, turns up her nightie, and administers the world's clumsiest paddling. Needless to say, Nelle blows her stack, and poor John is reduced to stammering like Porky Pig before running out.