My sleep is often effected by whether I've had a drink or not. If I've had a drink, then I fall to sleep quickly, but wake up in the early hours with my mind racing. If I haven't had a drink, it takes me a long time to get to sleep.
But I have stopped battling it either way. If I can't sleep and it starts annoying me, I get up, have a warm drink and something to eat, and do something like watch TV or google something, and when I feel tired again, I go back to bed, or lay down on the sofa.
Sometimes when I'm really tired, I find a point when I can't be bothered to be anxious, it's not a healthy mindset to stay in, but for a while, it's kind of a relief to go 'whatever - I don't care anymore'.
So I would say don't battle it, or beat yourself up when you can't sleep, or when you're exhausted. Just go with it and be gentle on yourself.