In this paper, we extend the optimization analysis found in the current literature for single-degree-of-freedom vibrational energy harvesters. We numerically derive and analyze the optimization conditions based on unified expressions for piezoelectric and electromagnetic energy harvesters. Our contribution lies in the detailed analysis and comparison of both resonant and anti-resonant states while fully including the effect of intrinsic resistance. We include both the case of excitation by inertial load and prescribed displacement, as the latter has not been elaborated on in the previous literature and provides new insights. We perform a general analysis but also consider typical values of applied piezoelectric and electromagnetic energy harvesters. Our results improve upon previous similar comparative studies by providing new and useful insights regarding optimal load, load power and power input to output efficiency. Our analysis shows an exponential increase in the critical mechanical quality factor due to the resistive loss coefficient. We find that the ratio of mechanical quality factor to resistive loss coefficient, at resonance, increases drastically close to the theoretical maximum for load power. Under the same optimization conditions, an equivalent conclusion can be drawn regarding efficiency. We find that the efficiency at anti-resonance behaves differently and is equal to or larger than the efficiency at resonance. We also show that the optimal load coefficient at resonance has a significant dependence on the mechanical quality factor only when the resistive loss coefficient is large. Our comparison of excitation types supports the previous literature, in a simple and intuitive way, regarding optimal load by impedance matching and power output efficiency. Our modeling and exploration of new parameter spaces provide an improved tool to aid the development of new harvester prototypes.