This extension prevents your computer from going to sleep while Firefox is actively downloading. The extension has no options, no configuration -- just install it and it should work.
When a download begins, it makes a call to kernel32.dll SetThreadExecutionState to prevent the computer from going to sleep. Additional downloads simply increment an internal counter. When the counter hits zero (supposedly when all download have either completed, failed, or been paused, etc), it calls SetThreadExecutionState again to allow the computer to go to sleep again.
As it is right now, this is a stupidly simple extension. If anyone has requests, I can try to work them in; however, my real intent is to have existing download managers (I use DownloadStatusBar) pick this functionality up in their code.
Tested on Win7 (x64) and Firefox 9.0.1.
I updated this for Firefox 18.0 and seems to work fine on my laptop. Let me know if it works/doesn't work for you.