Typically it is said that the coffee is best from 4 to 24 hours after roasting, or someone say it should be rested a few days. But I think it is no generalization because all beans are different and the way of roasting, brewing are different.
I personally, I let the beans rest for a day. if I have time in the morning I roast and grind right away. Please try various way and find your favorite!