  Given a reflexive polytope with a height function, we prove a necessary and
sufficient condition for solvability of the associated Monge-Amp\`ere equation.
When the polytope is Delzant, solvability of this equation implies the metric
SYZ conjecture for the corresponding family of Calabi-Yau hypersurfaces. We
show how the location of the singularities in the tropical affine structure is
determined by the PDE in the spirit of a free boundary problem and give
positive and negative examples, demonstrating subtle issues with both
solvability and properties of the singular set. We also improve on existing
results regarding the SYZ conjecture for the Fermat family by showing
regularity of the limiting potential.
