This film was based on a play called "A Cup of Coffee" which Preston Sturges wrote in the summer of 1931. The play also features a character named Jimmy MacDonald who works for a coffee company and enters a contest for a rival company with the slogan "If you can't sleep at night it isn't the coffee, it's the bunk." Much of the play's plot and supporting characters were changed for the film, but the dialogue between Jimmy and his girlfriend about his slogan is repeated almost verbatim. "A Cup of Coffee" was never produced in Sturges' lifetime, but it was eventually staged by the New York theater company Soho Rep in a production that opened in March of 1988, fifty-seven years after the play was written and twenty-nine years after Sturges' death.