I vaguely recall reading somewhere that, for dairy-intolerant people, certain molecules in the dairy can cross the blood-brain barrier, and thus affect the brain with hormonal effects. That would explain the dreaming-stimulation.
In the casein molecule I believe of 229 amino acids that the sixty-seventh in the newer breed cows is histidine while in the older breeds of bovines and in goats and sheep it's proline.
I don't remember which, but of proline and histine, one binds with something called something like BM7, it's some kind of opiate-like substance.
Is that what you mean?
Anyway, whether it causes dreaming or not, I'm not sure it's a bad amino acid for everyone, or if it's good for some people.
Personally I have a bias in favor of A2 breeds being better, but I think each individual who gets a cow should learn the difference first before getting one, and then choose for themselves which milk giving animal provides better for their own drinking or eating needs.
Maybe both A2 and A1 milk giving animals give dreams. It could have something to do with why people "count sheep" before falling asleep.
Many people who are dairy intolerant do better with A2.
I like dreams. I like the short dreamless sleep I get when I eat raw meat and no carbs or dairy. They're both good in my opinion. Of course there are times you want to sleep less, and in those times I'd say go paleo, no milk of course.