Let me tell you first up that it is a very bad idea. Your microcontroller need 5V for proper working and if you use a transistor, it will drop significant amount of voltage across it and the microcontroller will not get 5V. Again I never seen such a circuit so far.
If you want to save power, you can use sleep mode of the microcontroller. Suggest you to post more details about your project so that I can help you better.