This is a play on the word ground. Ground can mean the surface of the earth. Ground is also the past tense of the word grind, coffee is ground up. Coffee tasted like mud because it was ground (as in the coffee used to be a piece of the surface of the Earth). 
The coffee tasted like mud because it was ground a couple of minutes ago .