The maximal value is $2\sqrt{n-1}$ if $n$ is odd, and $2\sqrt{n}$ if $n$ is even. We can prove the following:
Let $a_1, \ldots, a_n$ be real numbers, $n \ge 2$. Then
$$ \tag{*}
|a_1 - a_2| + |a_2 - a_3| + \ldots + |a_{n - 1} - a_n| + |a_n - a_1|
\le c_n \sqrt{a_1^2 + \ldots + a_n^2}
$$
where $c_n = 2\sqrt{n-1}$ if $n$ is odd, and $c_n = 2\sqrt{n}$ if $n$ is even. The bounds are sharp.
Proof: Case 1: $n$ is even. Then
$$
|a_1 - a_2| + |a_2 - a_3| + \ldots + |a_{n - 1} - a_n| + |a_n - a_1| \\
\underset{(1)}{\le} \sum_{k=1}^n (|a_k| + |a_{k+1}|) = 2 \sum_{k=1}^n (1 \cdot |a_k|)
\underset{(2)}{\le} 2 \sqrt{n} \sqrt{\sum_{i=1}^{n} a_i^2 } \, ,
$$
where the last step uses the Cauchy-Schwarz inequality.
Equality holds at $(1)$ if the $a_k$ have alternating signs, and equality holds at $(2)$ if all $|a_k|$ are equal. It follows that equality holds in $(*)$ exactly if
$$
(a_1, \ldots, a_n) = (x, -x, \ldots, x, -x)
$$
for some $x \in \Bbb R$.
Case 2: $n$ is odd. There must be (at least) one index $k$ such that $a_{k-1} - a_k$ and $a_k - a_{k+1}$ have the same sign. Without loss of generality $k=n$, so that
$$
|a_{n-1} - a_n | + |a_n - a_{1}| = |a_{n-1} - a_{1}| \, .
$$
Then, using the already proven estimate for the even number $n-1$,
$$
|a_1 - a_2| + |a_2 - a_3| + \ldots + |a_{n - 1} - a_n| + |a_n - a_1| \\
= |a_1 - a_2| + |a_2 - a_3| + \ldots + |a_{n - 1} - a_1| \\
\underset{(3)}{\le} 2\sqrt{n-1} \sqrt{\sum_{i=1}^{n-1} a_i^2 }
\underset{(4)}{\le} 2\sqrt{n-1} \sqrt{\sum_{i=1}^{n} a_i^2 } \, .
$$
Equality holds at $(3)$ if $(a_1, \ldots, a_{n-1}) = (x, -x, \ldots, x, -x)$, and equality at $(4)$ holds if $a_n = 0$. It follows that equality holds in $(*)$ exactly if
$$
(a_1, \ldots, a_n) = (x, -x, \ldots, x, -x, 0)
$$
for some $x \in \Bbb R$, or a cyclic rotation thereof.
Best Answer
A brute force method: $f(x)=\sqrt{1-\sqrt x}$, then, $f'(x)=-\frac{1}{4\sqrt{x}\sqrt{1-\sqrt{x}}}$, $f''(x)=\frac{2-3\sqrt x}{16\sqrt{(1-\sqrt x)x}^3}$. Therefore, the function $f(x)$ is convex for $x<4/9$ and concave for $x>4/9$. So, we can make $f(x_1)+f(x_2)$ (WLOG $x_1\le x_2$) larger we do the adjustment:
(a) If $0\le x_1\le x_2\le 4/9$, $f(x_1)+f(x_2)\le f(x_1-\delta)+f(x_2+\delta)$ for all $\delta\in[0,\min(4/9-x_2,x_1)]$.
(a) If $4/9\le x_1\le x_2\le 1$, $f(x_1)+f(x_2)\le f(x_1+\delta)+f(x_2-\delta)$ for all $\delta\in[0,\frac{x_2-x_1}2]$.
Therefore, $\sum_{i}f(x_i)$ reach maximum when it can't be adjusted by the method above. Specifically:
(a) all the $x\ge 4/9$'s are equal.
(b) all the other $x\le 4/9$ are hitting the boundary (that is, being $0$ or one single value.)
So, we have $0=x_1=\dots=x_k\le x_{k+1}<4/9\le x_{k+2}=\dots=x_n$.
Since all $x_i\le 1$, we have $2\le n-k\le 4$. We have three cases:
Case 1: $n-k=2$. So, we have $0=x_1=\dots=x_{n-3}\le x_{n-2}<4/9\le x_{n-1}=x_n$. Let $x_n=x$, and we have $x_n\ge 7/9$. Therefore, we have
\begin{align}&\sum_i f(x_i)=n-3+\sqrt{1-\sqrt{x_{n-2}}}+\sqrt{1-\sqrt{x_{n-1}}}+\sqrt{1-\sqrt{x_{n}}}\\ \le &n-3+1+2\sqrt{1-\sqrt{7/9}}\le n-3+1.236\dots\end{align}
Notice that $n-3+\sqrt{9-3\sqrt{6}}=n-3+1.285\dots$, so this case is smaller.
Case 2: $n-k=3$. So, we have $0=x_1=\dots=x_{n-4}\le x_{n-3}<4/9\le x_{n-2}= x_{n-1}=x_n$. Let $x_n=x$, and we have $14/27\le x_n\le 2/3$. Therefore, we have
\begin{align}&\sum_i f(x_i)=n-4+\sqrt{1-\sqrt{2-3x}}+3\sqrt{1-\sqrt{x}}\end{align}
Let $g(x)=\sqrt{1-\sqrt{2-3x}}+3\sqrt{1-\sqrt{x}}$. Therefore, $g'(x)=\frac{3}{4}(\frac 1{\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}})$ Notice that $\sqrt{x}\sqrt{1-\sqrt{x}}$ is an increasing function in $[0,1]$. Also, $2-3x\le x$ since $14/27\le x_n\le 2/3$. Therefore, we have ${\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}\le {\sqrt{1-x}\sqrt{1-\sqrt{x}}}$, and thus $\frac 1{\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}}\ge 0$, $g'(x)\ge 0$. Therefore, in this case, $x=2/3$ get the maximum value, which is your proposed solution \begin{align}&\sum_i f(x_i)=n-4+\sqrt{1-\sqrt{2-3\times 2/3}}+3\sqrt{1-\sqrt{2/3}}=n-3+\sqrt{9-6\sqrt 3}\end{align}
Case 3: $n-k=4$. So, we have $0=x_1=\dots=x_{n-5}\le x_{n-4}<4/9\le x_{n-3}=\dots =x_n$. Let $x_n=x$, and we have $4/9\le x_n\le 1/2$. Therefore, we have
\begin{align}&\sum_i f(x_i)=n-5+\sqrt{1-\sqrt{2-4x}}+4\sqrt{1-\sqrt{x}}\end{align}
Let $g(x)=\sqrt{1-\sqrt{2-4x}}+4\sqrt{1-\sqrt{x}}$. Therefore, $g'(x)=\frac 1{\sqrt{2-4x}\sqrt{1-\sqrt{2-4x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}}$. Similar to the previous case, $g'(x)\ge 0$, and we take $x=1/2$. Therefore, we have
\begin{align}&\sum_i f(x_i)=n-5+1+4\sqrt{1-\sqrt{1/2}}=n-3+1.164...\end{align} which is also smaller.
Therefore, the maximum value is $n-3+\sqrt{9-3\sqrt 6}$