Sitcom about a Lucy-like wife whose husband, a judge, claims one can "never know where her brain has flown" ran from 1952-55. Link to credits.
Jim Backus's family court judge compared the cases he saw with similar situations featuring his wife, played by Joan Allen. Listen to the theme.