There's something about the night that amplifies feelings such as loneliness I think.

I sometimes can't get to sleep. But more often what happens is that I'll wake up, after I've been asleep, & can't get back to sleep.

One thing I used to do was to get up & do walking meditation for an hour or so. I'd walk around-&-around placing light attention on each foot as it encountered the floor. Our townhome would be dark & quiet. I'd hear the sounds of the city off in the distance. If it happened to be raining, that was a plus. I loved doing this. But my wife objected.

So I haven't done it for a while now. Sometimes I still think about it though.