Your brain is up to ALL kinds of shit that you're not aware of, especially when you're asleep. The "I struggled with learning this passage/piece/etc all damn day, and woke up the next day and there it was" is very common!