This is a question about statistical geometry.
The image https://commons.wikimedia.org/wiki/File:Ball_of_yarn_10.jpg shows a typical ball of yarn. Such a spherical ball of radius $$ has a volume $V=4π^3/3$. The radius of the yarn is $$. The idealized yarn of the question is assumed to be unstretchable and infinitely flexible.
Is there some method, maybe using random walks, to estimate an expectation value for the yarn length, given the radius R of the ball and the radius r of the yarn? (This is not homework; the question is about the ensemble average over all possible balls of radius .)
The length will depend on the way the ball is formed. There will be air-filled space inside the ball. Therefore yarn length $$ is surely smaller than $/(π^2)$. But what is its average length $L$ for an average ball? How can one determine this average length? Equivalently: how much air is contained in an average ball of yarn?
I suggest to replace the divisor $\pi r^2$ in your tentative formula for $L$ by the area $2\sqrt{3}\,r^2$ of the circumscribed hexagon. In this way neighboring strands of the yarn are most densely packed. This would lead to $$L\approx{4\pi R^3/ 3\over2\sqrt{3}r^2}={2\pi R^3\over3\sqrt{3}\,r^2}\ .$$