However, the prevailing theory is that dreaming helps you consolidate and analyze memories (like skills and habits) and likely serves as a “rehearsal” for various situations and challenges that one faces during the daytime. We also know much — but not all — of what's going on physiologically during dreams.