You are witnessing normal behavior. Snakes seek tight, enclosed spaces to feel secure.
On average, a week to never. There really is no average when it comes to wild animals. I know that is not the kind of answer you wanted, but there really is no definitive answer. Generally, they are calm snakes and grow out of their defensive behaviors rather quickly.
As for feeding in or out of the enclosure, it's an age old debate. I personally have never fed out of the enclosure. Some argue, the snake will associate the opening of the cage as food. I will argue that point by saying, every time you take the snake out, you are more likely to be bitten because the snake thinks you are going to feed it. See what I'm saying.....or if you are a Cal king, you can just bite what ever is closest to you. lol. I would recommend doing what is easiest for you, and more importantly your snake.