Most commonly done during idle afternoons, boring nights when nothing's happening, or as an absurd attempt to find a bright side in a situation from hell.
Shrink: In my professional opinion, all I can really suggest is that you start shitting rainbows.
druggy two: "You have any more of those?"
"Yeah...you should have seen him this morning...looked like he was shitting rainbows."
"OMG!! When Daniel asked me out...I swear I was shitting rainbows..."