Additive manufacturing (AM) is a rapidly emerging technology that has the potential to produce personalized scaffolds for tissue engineering applications with unprecedented control of structural and functional design. Particularly for bone defect regeneration, the complex coupling of biological mechanisms to the scaffolds' properties has led to a predominantly trial-and-error approach. To mitigate this, shape or topology optimization can be a useful tool to design a scaffold architecture that matches the desired design targets, albeit at high computational cost. Here, we consider an efficient macroscopic optimization routine based on a simple one-dimensional time-dependent model for bone regeneration in the presence of a bioresorbable polymer scaffold. The result of the optimization procedure is a scaffold porosity distribution which maximizes the stiffness of the scaffold and regenerated bone system over the entire regeneration time, so that the propensity for mechanical failure is minimized.