I'm (weakly) leaning in this direction as well. But, there are other proposed functions of dreams that are hard to reconcile with this. Some people think that dreams prevent overfitting and/or sample the negative gradient in a contrastive learning algorithm. Perhaps these are the same thing in end? But I'm not sure how it all fits together.