Several factors can contribute to macrosomia. One of the primary causes is maternal diabetes, including both gestational diabetes and pre-existing diabetes. Other risk factors include maternal obesity, excessive weight gain during pregnancy, a history of macrosomia in previous pregnancies, and genetic factors. Overdue pregnancy (post-term pregnancy) can also increase the risk of having a macrosomic baby.