If your rice cooker has that kind of timer, yes, you can do that. Just before you go to bed, add cold water (the same amount you would use if you were cooking it right away), rice and optional salt and butter. Stir well and set the timer for about 1/2 of an hour before you get up.
If you're using an external timer, be sure that it actually starts the rice cooker when it kicks on. Some appliances have to be switched on after they are plugged in.
There is not a complete consensus here that this is safe, but millions of Japanese do it, and there hasn't been a big enough outbreak of anything to warrant any kind of warning that I have ever seen. And many recipes call for 12 or more hours of room temperature soaking - including one I just did last week for sticky rice. For an extra level of protection, you can use ice water (including cubes) and measure it by weight. Just don't feed it to pregnant women or the immunocompromised, OK?