Let $P(n)$ be the period of the decimal expansion of $1/n$, for prime $n$ (e.g. $1/7=0.\overline{142857}\rightarrow P(7)=6$). The value of $P(n)$ fluctuates heavily, but it seems to have an average behavior that is more easily visible by considering the function
$$S(x)=\sum_{k=1}^{x}P(p_k)$$
Where $p_k$ is the kth prime. Below is the graph of $S(x)$.

A power regression gives the following approximation with an $R^2$ of $0.9998753$ $$S(x)\approx0.94782x^{2.11976}$$ which would imply that the average value/approximation of $P(p_n)$ around $p_n$ is $$P(p_n)\approx 0.94782(n^{2.11976}-(n-1)^{2.11976})$$ Is there a way to derive this behavior other than empirically?
This question was inspired by another similar problem related to the Collatz conjecture.
The value of $P(p_n)$ is always $\frac{p_n-1}{k}$ for some integer $k$. Then, the expected value of $P(p_n)$ is given by $$P(p_n)\sim\sum_{k=1}^{\infty}r_k\cdot\frac{p_n-1}{k}$$ Where $r_k$ is the proportion of primes that satisfy $P(p_n)=\frac{p_n-1}{k}$. Simplifying the expression gives $$P(p_n)\sim(p_n-1)\sum_{k=1}^{\infty}\frac{r_k}{k}$$ The values of $r_k$ seem to not be a solved problem in mathematics. There are some articles, such as this one, that address this subject. The first value, $r_1$, is known as Artin's Constant, and is about $0.374$. By numerically calculating, the value of the above sum appears to be $0.577\pm0.001$. These results match what @eyeballfrog pointed out in the comments.
With respect to the function $S(x)$, $$S(x)\sim\left(\sum_{k=1}^{\infty}\frac{r_k}{k}\right)\sum_{n=1}^{x}(p_n-1)$$ The above expression matches the calculated values remarkably well.
As also mentioned in Jam's answer, a rough approximation can be given by the Prime Number Theorem: $$S(x)\approx0.577\left(\frac{(x\ln(x))^2}{2\ln(x\ln(x))}-\frac{x}{\ln(x)}\right)$$ Though it seems that this is a really bad approximation. Replacing $0.577$ by $\approx0.145$ gives much better results