If the net result is positive, anything is better than nothing.
There are a few issues with your plan..
Your routers may have a technical limitation. The amount of storage space available for the router firmware is very limited. There may not be enough storage to accommodate the routing software, mining software and whatever temporary storage is required for routing and mining.
Currently your routers do not run at 100% CPU. Changing them to 24/7 100% operation would consume more electricity.. likely enough to eliminate any profits (assuming you are paying the bill). Also, most routers are not designed to run with such high constant load and generally do not have sufficient cooling solutions installed. You are likely to reduce the operating life of your routers significantly.
You are talking about writing your own custom firmware which would both enable all current router functions as well as some sort of idle cycle detection which would launch the mining activity. This would be a significant amount of effort. I suspect you are thinking of deploying this to a significant number of routers to achieve a multiplier to your 0.20 / year Bitcoin bounty. You might require multiple firmware packages to accommodate different router models and hardware revisions. The amount of time required to develop, test and maintain all this firmware will be very significant.
You are likely to see an increase in network issues. The combined router / miner will not have the same routing efficiency as a dedicated router. Overburdened and overheating hardware will likely cause intermittent failures. If these routers are located at your work these failures could result in discovery which could cost you your job.
So.. if a few Bitcoins / year is worth hundreds of hours of programming work and the possibility of losing your job then this sounds like a great idea.