How can I exercise my ankle after a sprain?

Range of motion . You can exercise your ankle by doing range of motion exercise. Pretend your big toe is a pen and write the alphabet in capital letters. Do 2-3 sets, 2-3 times per day. You can also get a theraband and exercise the ankle against resistance.
Carefully. I would suggest wearing an ankle brae for the first few weeks to avoid further damage.