I suffered from swollen ankles (left one in particular after I damaged my knee!) for many years before I got diabetes. It's always worse in hot weather, but has also happened when I've had other problems with my legs. The swelling can be related to poor circulation, which I assume could be aggravated by or associated with your diabetes?
My doctor originally told me to "rest with your feet up higher that your bum" - his actual words.
But has now recommended that I wear support stockings. He has also suggested doing a little exercise to strengthen my calves, standing and going up and down on tiptoe; or going up & down stairs on tip toe, too - which I told him would be the death of me as I'm not always very safe on stairs now...
Robbity
PS I've had to look for extra wide shoes/sandals so I can get my feet into them in the hot weather.