E.L. Konigsburg, From the Mixed-Up Files of Mrs. Basil E. Frankweiler

But lying in bed just before going to sleep is the worst time for organized thinking; it is the best time for free thinking. Ideas drift like clouds in an undecided breeze, taking first this direction and then that.