the sort of improbable fantasy one has while smoking opium, 1870, from pipe (n.1) in the smoking sense + dream (n.). Old English pipdream meant "piping," from dream in the sense of "music."