The question was what can be done to avoid early waking. This is where you wake up in the small hours, say 4-6am and can't get back to sleep, even though you need to. So if you went to bed at 8pm and woke up at 6am that doesn't count!
Firstly are you being woken up by noise or temperature or light? A change in any of these can easily wake you up. I have blackout blinds and usually sleep with earplugs for this very reason.
Next question is did you / do you eat your dinner late? Eating less then 3hours before bed will mean you go to sleep without completing digestion which can cause sleep disturbances. If you have to eat late then avoid meat and cheese and you'll probably sleep better.
Did you have any caffeine during the day? This is probably super obvious to all of you but I am still surprised by how many people don't realise that taking a drug designed to make you feel more alert would disrupt your sleep patterns. If you have any sleep problems I'd recommend cutting out coffee altogether as a minimum, but in general avoid caffeine after midday.
Were you dehydrated? Your body will wake you up if it needs anything so make sure you're hydrated. But don't make the mistake I sometimes make of forgetting to drink all afternoon, drinking lots in the evening and then waking up in the night to use the bathroom! Make sure you drink throughout the day so your pee is only the faintest yellow colour before you go to bed.
Did you have any alcohol? This really affects me. I rarely drink these days but whether I have 1 drink or 3 I always wake up early the next day instead of being able to sleep it off.
One of the reasons alcohol can cause early waking is that alcohol is a fast burning sugar, so can give you a sugar high but be followed by a blood sugar crash. If you're blood sugar drops too low your body produces adrenaline and cortisol to raise them to a safe level, but unfortunately their production also wakes you up.
This is why stress and poor food choices can also lead to disturbed sleep. Stress can mess up your pattern of producing cortisol, making you tired at night and alert during the day, whilst also disregulating your blood sugar.
Eating a dinner that isn't big enough or has a high glycemic index and/or insufficient protein can lead to blood sugar drops during the night. That's why choosing wholegrains such as brown rice, quinoa or bulgar wheat is so important in the evening, along with fibre rich vegetables to slow digestion even more add in some fish, tofu or pulses for some healthy protein, leave a couple of hours to digest before you go to bed and you should sleep through.
For anyone who has to eat early for work, childcare or other reasons then a tactical snack 90 minutes before bedtime should do the trick, have a protein shake or natural yoghurt with a banana + some seeds, or some oatcakes with hummous or no sugar peanut butter and you should be sustained through til morning.