I have limited knowledge of the theory of stochastic processes. While working on a problem I've stumbled upon some expected values of time integrals of Gaussian stochastic processes. Before starting to delve into the literature on stochastic processes, I'd like to know if one can say anything (exact or approximate) about quantities like
$$ \left\langle \int_0^Tdt_1\int_0^{t_1}dt_2 B(t_1)B(t_2) \right\rangle $$
or
$$ \left\langle \left(\int_0^Tdt_1\int_0^{t_1}dt_2 B(t_1)B(t_2)\right)\left(\int_0^Tdt_3\int_0^{t_3}dt_4 B(t_3)B(t_4)\right) \right\rangle $$
where $B(t)$ is a realization of a stationary Gaussian process with zero mean and a known autocorrelation function $K(t_1-t_2) = \langle B(t_1)B(t_2) \rangle $.
The question is asking about the first and second moments of the random variable $$X=\int_0^Tdt_1\int_0^{t_1}dt_2 B(t_1)B(t_2).$$ By symmetry, $$2X=\int_0^Tdt_1\int_0^Tdt_2 B(t_1)B(t_2)=Y^2,$$ where $$Y=\int_0^Tdt_1B(t_1).$$ Since the family $(B(t))$ is centered gaussian, $Y$ is centered gaussian hence $$X=\langle X\rangle Z^2,$$ where $Z$ is standard gaussian. Note that $$\langle X\rangle=\int_0^Tdt_1\int_0^{t_1}dt_2 \langle B(t_1)B(t_2)\rangle=\int_0^Tdt_1\int_0^{t_1}dt_2 K(t_1-t_2),$$ hence the first expectation you are asking about is $$\langle X\rangle=m(T),\qquad m(T)=\int_0^T(T-t)K(t)dt.$$ Finally, $\langle Z^2\rangle=3$, hence the second expectation you are asking about is $$\langle X^2\rangle=\langle X\rangle^2\langle Z^2\rangle=3m(T)^2.$$