Hello.
Are you physically active? Are you sitting on a chair for an extended period of time?
Try to increase your fluid intake and LIE DOWN. Don't over-exercise (but some exercise will do good) and try to spend time lying down (horizontally) with your feet resting on some pillows so that your ankles are above the level of your heart (raised feet).
Don't jump to hasty conclusions, I doubt it is hypophosphatemia, since acute hypophosphatemia is usually asymptomatic. If you had chronic hypophosphatemia, I believe you would have discovered that already. I once had the swollen ankles too after dry-fasting and it was resolved when I did the above.
But you should examine the edema yourself by pressing it; if the indentation (pit) disappears quickly (it shouldn't remain for more than a minute), then it is probably not a heart problem. So is it a "pitting" edema?