Experts say if you want to harness sleep’s problem-solving powers to the fullest, think about your dilemma just before bed