Dreaming is a universal human behavior that has inspired searches for meaning across many disciplines including art, psychology, religion, and politics, yet its function remains poorly understood.