Using a large-scale real effort experiment, we explore whether and how different peer assignment mechanisms affect worker performance and stress. Letting individuals choose whom to compare to increases productivity to the same extent as a targeted exogenous matching policy aimed at maximizing motivational spillovers. These effects are significantly larger than those obtained through random assignment and their magnitude is comparable to the impact of monetary incentives that increase pay by about 10 percent. A downside of targeted peer assignment is that, unlike endogenous peer selection, it leads to a large increase in stress. We uncover the behavioral origins of these desirable effects of peer choice using a combination of choice data, text analysis and simulations. The key advantage of letting workers choose whom to compare to is that it allows those workers who want to be motivated to compare to a motivating peer while also permitting those for whom social comparisons have little benefits or are too stressful to avoid them. Altogether, our results highlight that policies should not only be compared regarding their effects on output, but also with respect to their potential unintended consequences.