Get enough sleep. When you aren't getting enough sleep, everything that your brain does is worsened because of it. So creativity, thinking, cognitive functioning, problem solving, memory, all these are tied to getting enough sleep. Sleep is especially necessary for memory functions, so make sure you're getting to the deeper stages of sleep to allow for memory processing.