Agree with the above. You CAN, and the sky will not usually fall, but that does not make it a particularly good idea. It is very seldom necessary. Is this a heat-lamp issue? Chances are real good that unless you're doing something wrong (no insulation, or way humid coop) you can perfectly well turn the heat lamp off from like dinnertime to 3-4 a.m. and they will be FINE, and get some decent rest (not just sleep, I mean, but their bodies getting a break from the light, which affects various physiological systems as well)
If it is merely a convenience issue, timers are very easy to install.
Good luck, have fun,
Pat