But when I did have some weird red marks on my ankles I asked my GP and she reckoned it was a reaction to a blood pressure medication I was taking. She took me off it and the marks eventually went away.
So have you recently changed meds? (Mind you, I'd been on that medication for ages before I got the marks).
Is it both legs? If just one I'd be more inclined to assume you bumped them....
If you don't want to speak to a GP it's sometimes worth asking pharmacists about weird symptoms. They at least know whether it's worth taking to a doctor.
Anyway, maybe someone else will have some suggestions, though be aware that forum rules don't allow us to diagnose.