This makes intuitive sense but I'd love research into quantifying to what extent the explanation is "better sleep makes loneliness more subjectively tolerable (because better sleep makes you more emotionally resilient to all hardships, which seems obvious to me from experience)" versus to what extent it's more indirect: "better sleep makes you more competent in general, including at accomplishing tasks that will lead to objectively being less alone (eg, you're less tired and more willing to try going out to an event)"