In general, you should use the basal body temperature (BBT) from your regular wake-up time. If you get up in the night for any reason and you know that you will go back to sleep and wake again at your usual wake-up time, resist the urge to take your temperature. Taking your BBT more than once usually just leads to confusion and anxiety and will often make you lose more sleep.
If you are not sure that you will be able to go back to sleep, you can take your temperature, but only use it on your chart if you are not able to go back to sleep. Always enter any special circumstances in the notes section of your Fertility Friend app so that you will remember what conditions might be affecting a temperature reading.
If you have learned through fertility charting over several cycles that you are more likely to get an accurate BBT reading after your longest resting time, rather than by taking your temperature at the same time, (when it is not possible to do both) then you can use the basal body temperature that was taken after the longest sleep period. Over time (if necessary) you will learn the way your own temperature reacts to changes in waking and sleeping times.