It may be a GPU problem
It started happening on my machine recently and the timing approximately co-incided with my interest in webgl. I am not aware of any system updates that I could blame this on. It could have been just a co-incidence, but it lead me to a solution.
The problem was that during the last couple weeks, the machine would go to sleep normally but wake up with both fans going full speed. Sometimes, putting it back to sleep and waking it up again helped reset the fans. Today, doing so did not help and I looked further. I could not afford to reboot the machine (too much going on), so I ignored the advice to reset the SMC and kept looking for causes.
I noticed that the GPU temperature (Graphics Processor Heatsink) was reported at -128°C (negative temperature; probably a code for "unknown"). That makes sense: if the temperature is not known, better work the fans up, just in case it is high. So it was clear to me that it was not a fan speed issue but rather a GPU subsystem issue. What could have broken it? I recalled that when I started playing with webgl, I had to enable it in Safari, and I recalled asking myself why wouldn't it be enabled by default. I suspect Apple considers it unstable. It could be that, but I don't know enough to be sure. The following sequence returned fan speed to normal:
1. Disalble webgl in Safari (Develop -> Enable WebGL)
2. Quit Safari
3. Go to sleep.
4. Wake up (after a few seconds)
Update: webgl probably doesn't have anything to do with it. My machine woke up several more times with fans at high speed after I had disabled webgl in Safari, but I was able to reset fans just by quitting Safari and going to sleep. Safari is still a suspect because going to sleep without quitting it did not help.