A professional roaster told me at least a week. I brought them green beans which they roasted and phoned me after a week (telling me that before that would be too soon and taking a chance) to come pick up.
It varies. I roast at home, and some beans are great the next day. Some are great the next week. The cafe I used to live next to would rest their beans for a week.