The expression of the Chern-Simons functional as an integral over a 3-apace is just a shorthand notation. The integration in the Chern-Simons functional differs from the integration of differential forms.
The integration can formulated by means of the theory of Deligne-Beilinson cohomology. (Please, see the following very clear review by Frank Thuillier, and the second chapter of his thesis.
Although the formulation of this theory by the mathematicians Deligne and Beilinson was for completely different intentions, this theory found major applications in geometric quantization and topological field theory. In fact, the need to deeply understand several phenomena such as the Aharonov-Bohm effect, the $B$-field in string theory, etc. led physicists to (partially) rediscover this theory, such as the works by Wu and Yang and Orlando Alvarez.
In Deligne-Beilinson cohomology the gauge potential $\mathbf{A}$ , the Chern Simons characteristic class $\mathrm{CS}(\mathbf{A})$ etc., are examples of Deligne-Beilinson (DB) cocycles. Among other things, the Deligne-Beilinson theory allows an unambiguous integration of (DB) cocycles over homology cycles of a compact manifold $M$. The integral values will be well defined modulo integers.
For smooth manifolds the Deligne-Beilinson cohomology can be constructed by means of the Cech-de Rham bi-complex, clearly described in Orlando Alvarez's reference above. Its basic objects are the Deligne-Beilinson (DB) cochains consisting of a collection of local data:
$$\mathbf{\omega}^{(n)} = (\omega^{(n)}_{\alpha}, \eta^{(n-1)}_{\alpha \beta}, \zeta^{(n-2)}_{\alpha \beta \gamma}, …., c^{(0)}_{\alpha \beta , ….}, n^{(-1)}_{\alpha \beta , ...})$$
(the last terms in the decomposition (with de Rham degree of $-1$) are integral Cech cochains)
For example an Abelian gauge potential has the following components:
$$\mathbf{A} = (A_{\alpha}, \psi_{\alpha \beta}, n_{\alpha \beta \gamma} )$$
Where, the individual objects in the collections are Cech cochains of local differential forms with decreasing form degree and increasing Cech degree defined on multiple intersections of a good cover of $M$.
The coboundary operator $D$ in the DB cohomology (satisfying D^2=0) is
$$ D = \tilde{d} + \delta$$
Where
$$ \tilde{d} = (-1)^c d$$
($d$ is the de-Rham differential, $c$ is the Cech degree) and , $\delta$ is the Cech differential given for example on a Cech 2-cochain:
$$\delta \psi_{\alpha \beta} = \psi_{\alpha \beta} + \psi_{\beta\gamma} + \psi_{\gamma\alpha} $$
The following should be understood: The action of the operator $\tilde{d}$ on global forms (such as gauge field strengths) results in zero and its action on integral Cech cochains is an injection of their numerical values.
The above decomposition allows a natural definition of a cup product just by adding up the different components of all possible wedge products of two BD cochain components with the same de Rham and Cech degrees.
Example: the coboundary of the Abelian gauge potential is given by (in shorthand):
$$D\mathbf{A} = (0, \delta A + \tilde{d}\psi, \delta \psi + \tilde{d}n, \delta n)$$
Thus the cocycle condition for the vector potential:
$$D\mathbf{A} = 0$$
produces the gauge transformation in the double intersections $, \delta A + \tilde{d}\psi = 0$ (second term),the third term $\delta \psi + \tilde{d}n$ is a reformulation the consistency condition in a triple intersection, the last term asserts that the Cech cocycles are constants on every triple intersection. The integrality requirement of the Cech cocycles is equivalent to the Dirac's quantization condition.
The above relations can be expressed by means of the following tic-tac-toe diagram
\begin{array}{c c|c c c c c c c }
\Omega^2 & F & F_{\alpha} \\
& & \uparrow_{d} \\
\Omega^1 & & A_{\alpha} & \xrightarrow{\delta} & \delta A_{\alpha}= d\psi_{\alpha\beta} \\
& & & &\uparrow_{d} \\
\Omega^0 & & & & \psi_{\alpha\beta} & \xrightarrow{\delta} & \delta\psi_{\alpha\beta} = n_{\alpha\beta\gamma}\\
\hline
& & & & && n\\
& & U_{\alpha}& &U_{\alpha\beta}& &U_{\alpha\beta\gamma}\\
\end{array}
As mentioned in Orlando Alvarez's article, using the above relations, the flux of the connection $\mathbf{A}$ can be expressed as:
$$\int F = 2 \pi \sum_{U_{\alpha \beta \gamma}} n_{\alpha \beta \gamma}$$
In the case when $ \mathbf{A}$ is a flat connection (as in the Aharonov-Bohm effect):
$$dA = 0$$
We have further relations as depicted in the following tic-tac-toe diagram
\begin{array}{c c|c c c c c c c }
\Omega^2 & 0 & 0 \\
& & \uparrow_{d} \\
\Omega^1 & A & A_{\alpha} & \xrightarrow{\delta} & \delta A_{\alpha}= d\psi_{\alpha\beta} \\
& & \uparrow_{d} & &\uparrow_{d} \\
\Omega^0 & & \psi_{\alpha} & \xrightarrow{\delta} & \psi_{\alpha\beta} + c_ {\alpha\beta} & \xrightarrow{\delta} & 0\\
\hline
& & & & && \\
& & U_{\alpha}& &U_{\alpha\beta}& &U_{\alpha\beta\gamma}\\
\end{array}
Giving rise to the possibility of existence of constant Cech 2-cocycles $c_{\alpha \beta}$. There is no integrality constraints on $c_{\alpha \beta}$, since the $\psi$s are gauge transformations of a vector potentials therefore defined modulo $2 \pi \mathbb{Z}$, then also the $c$s are given modulo $2 \pi \mathbb{Z}$
The holonomy of the flat connection can be expressed solely in terms of these constant Cech cocycles (Please see the exact definition of the integral in the sequel)
$$\mathrm{hol}(A) = e^{i \oint A} = e^{i \sum_{U_{\alpha \beta }} c_{\alpha \beta }}$$
This relation is a special case of the general statement that the integral of a BD cocycle over a homology cycle is defined modulo $2 \pi \mathbb{Z}$.
The above two cases give rise to the characterizations of the BD first cohomology groups $H_D^1(M, \mathbb{Z})$ in terms of Cech-de Rham cohomology groups $ H^2(M, \mathbb{Z}) $ and the space of one forms on $M$ modulo integers:
$$0 \rightarrow \frac{\Omega^1_{\mathbb{Z}} (M)}{ \Omega^1(M)}\rightarrow H_D^1(M, \mathbb{Z}) \rightarrow H^2(M, \mathbb{Z}) \rightarrow 0$$
The right hand space gives rise to Aharonov-Bohm type connections while the left hand one is responsible for vector potentials of the magnetic monopole type.
Now, to perform the integration of a BD cocycle, one needs to choose a polyhedral decomposition of the integration cycle as Orlando Alvarez did and integrate each component of the BD cocycle on the corresponding polyhedron. This definition is independent of the good cover, polyhedral decomposition or gauge transformations modulo $2 \pi \mathbb{Z}$ .
The integral of the vector potential viewed as BD one cocycle has the form (generalization Orlando Alvarez equation 2.8)
$$\oint_{\Lambda} A = \sum_{\alpha} \int_{\Lambda_{\alpha}} A_{\alpha } + \sum_{\alpha \beta} \int_{\Lambda_{\alpha \beta}} \psi_{\alpha \beta} + \sum_{\alpha \beta \gamma} \int_{\Lambda_{\alpha \beta \gamma}} n_{\alpha \beta \gamma} $$
Where $(\Lambda_{\alpha}, \Lambda_{\alpha \beta}, \Lambda_{\alpha \beta \gamma})$ is a polyhedral decomposition of the trajectory $\Lambda$.
(Actually the last term is not needed since $n_{\alpha \beta \gamma}$ are integers)
Similarly, the integral of the Chern Simons class expressed by means of the BD components of the vector potential is given in Thuillier review equation 45:
$$\int_M \mathrm{CS}(\mathbf{A}) = \sum_{\alpha} \int_{M_{\alpha}} A_{\alpha }\wedge dA_{\alpha} + \sum_{\alpha \beta} \int_{M_{\alpha \beta}} \psi_{\alpha \beta} \wedge dA_{\beta} + \sum_{\alpha \beta \gamma} \int_{M_{\alpha \beta \gamma}} n_{\alpha \beta \gamma} A_{\gamma} + \sum_{\alpha \beta \gamma\delta} \int_{M_{\alpha \beta \gamma\delta}} n_{\alpha \beta \gamma} \psi_{\gamma \delta} $$