It may be the sunroof drains. I among others did some decent writeups on this before with good instructions. Here's the link:
http://www.xoutpost.com/x5-e53-forum/...-problems.html
Just be sure to thoroughly dry out UNDER your carpet as the foam padding is quite thick and holds water like a shamois sponge! You can get the top of the carpet to feel 100% dry and still have pools of water underneath...