Pain in ligs

I’ve noticed lately that i feel a little pain in the ligs after stretching for a while, so I imagine I went a little too far. Any tips on how long to rest for something like this?