This isn't something that I've done before, but I do enjoy the taste of beer and I recently had a chocolate vanilla porter from Troegs. They provide some text on how they did it : "After fermentation, we aged #54 on Ghanaian vanilla beans and medium roast Ghanaian cocoa nibs for ten days."
The vanilla was perfect in this brew, in my opinion. The cocoa was a little too bitter for my tastes, but I did enjoy the 1/2 growler of it. Here is a video on their beer (scratch 54):