What is the relation between sweep angle and lift-to-drag ratio?
This is my take on this.
We assume that an infinite-span swept wing is under compressible flow, and that the flow acts on it as in Figure 1 below:

With that, we can now utilize the equation of motion to find the relation between the sweep angle and the coefficient of lift, which in turn, will make the relation with the ratio L/D
From the equation of motion, we have:
$$(1-M^2_{\infty}\cos^2\Lambda)\frac{\partial^2 \phi}{\partial x^2} + \frac{\partial^2 \phi}{\partial y^2}$$
Now, only the perpendicular component acts we have that:
$$(u'_c)_n = \frac{\partial \phi}{\partial x} = \frac{1}{\sqrt{1-M^2_{\infty}\cos^2\Lambda}} \frac{\partial \Phi}{\partial x} = \frac{(u'_i)_n}{\sqrt{1-M^2_{\infty}\cos^2\Lambda}}$$
$$C_{p_c} = -2\frac{\cos\Lambda(u'_c)_n}{U_\infty} = -2\frac{\cos\Lambda(u'_i)_n}{U_\infty\sqrt{1-M^2_{\infty}\cos^2\Lambda}}$$
Now, since:
$$C_L = \frac{1}{c}\oint C_p dx$$
We have that:
$$C_L = \frac{C_{Li} }{\sqrt{1-M^2_{\infty}\cos^2\Lambda}}$$
The above equation shows that the lift coefficient is sweep angle dependent, therefore, the ratio L/D is also sweep angle dependent.
This is a very complex side of aerodynamics and understanding it completely requires some study. I recommend studying Chapter 11 from &quot;Fundamentals of Aerodynamics&quot; by J. Anderson (a classic) and Chapter 8 from &quot;Aerodynamics for Engineering Students&quot; by E.L. Hughton.