Eating leafy greens may help boost testosterone levels. However, if you're not a big green eater, beans, nuts and dark chocolate are also excellent sources of magnesium.