Data said it in "All Good Things...", and he did both pieces of dialogue in the same scene. (His drive-by comment when O'Brien mentions burning the midnight oil was followed only a couple minutes later by his 'ignite the midnight petroleum' comment.)
I always found it funny, too.
I always found it funny, too.