According to my orthopedic doctors at OrthoTexas, even with an ankle sprain, you can usually still exercise other muscles to minimize deconditioning. For example, you can use an exercise bicycle with arm exercise handles, working both your arms and the uninjured leg while resting the injured ankle on another part of the bike.
And follow RICE as suggested by many.
Most important of all, and often the most neglected, is balance training, which starts with standing on one foot (the injured one) on a firm, even surface, then on a foam surface or trampoline, first with eyes open, then eyes closed.