Take my word for it...counting sheep doesn't work! 😂 I have a habit of most nights waking up around 3 or 4.
Sometimes I put on soft classical or calming music and then fall asleep again in about ten minutes or so. Other times I get up and walk around the house, check on my son, have a drink of water then go to sit outside for a bit. Sometimes I fall asleep right after returning to bed, other times I just listen to the music until it's time to get up.
Winter times a nice hot cup of Rooibos- or Chamomile tea helps to fall asleep again too.