I think its to sniff out prey? On this Amazons deadly dozen show on National Geographics they showed an anaconda raising itself out of the water and said they sniff out prey that has recently passed by.
I wouldn't think so though.
'Cause they ain't flicking their tongues at all when doing this. I think like Davo says, they just go in a trance like state, bit of a daydream