I have a broken ankle which is in a cast. It likes to fall asleep a lot. Is there anything I can do to prevent that?

Yes. You need to see your orthopod, as the cast might need to be split open to relieve swelling that is probably cause of your numbness. Do you have increasing pain or discoloration of your toes?
Elevate. After any injury, the area can swell. A cast prevents the area from expanding outward...So it tends to compress inwards...And pinch on the nerves. Elevate it....Get your heel above where you heart is....That generally means a couple of extra pillows under your feet as you are leaning back in a recliner or lying flat.
See your doctor. Numbness or sleeping of your ankle is a bit of concern. Usually if the cast is applied too tight it will press down on you nerves and causes your ankle to fall sleep. This needs to be brought up to your doctors attention. Also depending on how severe your ankle fracture was you could have nerve issue.