This is an old post, but a new problem for me since we just bought a used 06 explorer.
The fix is electrical duct seal. There is a gap between the roof sheet metal and the plastic frame/casing/tray assembly for the sunroof. The tray does a great job collecting small leaks and draining them out the drain holes. The problem for me was that if the truck were parked at any angle/incline during a rainstorm, not all of the water would drain out. When we would get in and take off, some of the water would slosh up out of the tray before it had a chance to drain. It was finding it's way through that gap, which is directly about the overhead console, and the map light switch is the low point drain.
Therefore, stuff some duct seal into that gap and the problem is gone. Worked for me!
This is not the only place water can get in, obviously, but it is a factory flaw that caused brand new explorers to leak. So, might be worth it for you to start here. Also, the sloshing factor may explain why it's hard to recreate the leak on demand.