I know a fireman named Bill who thinks that if he places a book under his pillow while he sleeps, he'll absorb the material. When he needed to study for an exam to qualify as a fire captain, he used this trick.
Bill and I both have another friend, Marty. Marty had a medical problem. One day, fireman Bill called Marty on his cell phone to say he had a book that describes a cure-all approach to healing the body and he was going to stop by to drop it off. Marty covered the phone and said, "Bill's going to stop by to give me a book he wants me to read". I said "tell him you'll just put it under your pillow". When you put an idea into Marty's head, it's hard for him not to follow through, and so I heard him say to Bill "I'll put it under my pillow. That should work, right?". When he got off the phone, I asked Marty what Bill had said. "He said yeah, but read it too."
It is true that material that you read during the day becomes consolidated in memory while you sleep. I'm pretty sure it doesn't matter whether or not you put the book under your pillow.