These characters combine literally to mean “a foolish person says/speaks a dream.” The imagery is vivid: the words being spoken are as logical and grounded as something uttered during sleep. This paints the speaker as a “痴人” (a fool) and their words as nothing more than a “梦” (a dream).
This chengyu is common in both spoken and written Chinese. It's almost always negative and dismissive.