Best and the safest answer is when you feel ready to do so. Since the requirements of every job vary greatly, giving a single answer will not be correct. As long as your work does not involve heavy lifting, you can expect to be able to get back to work within 1-2 weeks. Given that it is possible, you may work from home, starting from the next day.