Question: who pissed in your cornflakes origin?
Answer: Asking “who pissed in your corn flakes” is a variant of this, meaning essentially, “why are you in such a bad mood (what/who pissed you off?). Corn flakes were invented before Wheaties cereal but since Wheaties became a very popular brand it would be a natural substitute.