I love D&D, and I try to integrate story as much as I can into every aspect of the game mechanics. One thing I've been thinking on recently, is how to make character levelling organic and smooth. I've seen different ways of levelling characters, but most involve going to bed and waking up a level higher, or spontaneously levelling in the middle of a dungeon, neither really have any reason why a character just got a new class feature or more spells.
On the other hand, having a character be out of the campaign for a week while they go on a personal quest everytime they level is really clunky and flow-breaking. Does anyone know a good way to integrate levelling?