5. As shown in Figure 1, given a regular tetrahedron $A B C D$ with edge length $1, M$ is the midpoint of $A C$, and $P$ lies on the line segment $D M$. Then the minimum value of $A P + B P$ is $\qquad$
5. $\sqrt{1+\frac{\sqrt{6}}{3}}$.

Let $\angle B D M=\theta$. In $\triangle B D M$, $B D=1, B M=M D=\frac{\sqrt{3}}{2}$.
It is easy to get $\cos \theta=\frac{\sqrt{3}}{3}, \sin \theta=\frac{\sqrt{6}}{3}$.
As shown in Figure 3, rotate $\triangle B D M$ around $D M$ so that $\triangle B D M$ lies in the plane $A C D$,
at this point, point $B$ is at $B^{\prime}$.
Connect $A B^{\prime}$ and $B^{\prime} P$. Thus, $A B^{\prime}$ is the desired minimum value.
And $\angle A D B^{\prime}=\angle A D M+\angle M D B^{\prime}=\theta+30^{\circ}$.
Then $A B^{\prime 2}=A D^{2}+D B^{\prime 2}-2 A D \cdot D B^{\prime} \cos \angle A D B$ $=2-2 \cos \left(\theta+30^{\circ}\right)=1+\frac{\sqrt{6}}{3}$.
Therefore, the minimum value of $A P+B P$ is $\sqrt{1+\frac{\sqrt{6}}{3}}$.