I've tried it both ways and wondered this often. I haven't gotten a definitive answer yet, but what I'm currently doing (with a night-nursing, cosleeping toddler) is I have an alarm set for 6:30 and I just take my temp then, even with varying bedtimes. Usually I'll have had between 4-6 hours of sleep by that point, and it's enough to get a trend for both pre- and post-ovulatory temperatures. Remember, you're looking for a pattern of temps, so as long as you can establish a coverline/get the thermal shift figured out, I think it's probably up to you how best to do that depending on your sleep patterns.
Â
I notice that around 4-5 hours of sleep before temping usually means my pre-ovulatory temps are about as low as they ever get (around 97.3 F). If my sleep is especially disturbed, I toss the temp out. I wake slightly with a nursing child occasionally at night, but unless it really disturbs my sleep I don't worry about it.
Â
I personally find having a consistent time is a lot easier for me than just when I wake up, because then I was always second-guessing how much sleep I'd gotten, and if I waited too late DS would be in the middle of his morning nursing, which might make it harder to temp. Also, if I wait too late and my alarm wakes DS up, he gets up for the day prematurely. 6:30 has been a nice compromise for me (we're night owls in this house and usually DS and I sleep until 8:30-9).
Â
I've also found temping vaginally rather than orally has helped a lot in getting consistent temps. HTH!