The optimization of polyhydroxybutyrate (PHB) production and accumulation in Nostoc muscorum was investigated by evaluating the effects of nitrogen, phosphorus, and photoperiod (light/dark) using a Box-Behnken design. A developed two-stage cultivation strategy enhanced the PHB production. The results indicated that conditions favoring PHB accumulation might limit biomass production, highlighting a trade-off between biomass yield and PHB accumulation. Experimental validation of the optimized conditions yielded 92.16 ± 15.84 mg PHB/L, 1.70 ± 0.19 g biomass/L, and 15.84 ± 3.11% dry weight of PHB. The two-stage cultivation approach consisted of producing the biomass with the optimal conditions in the first stage, followed by PHB accumulation of 2.5 times in the latter stage. These findings suggest optimal culture conditions and provide a strategy to improve PHB yields in N. muscorum.