You must try to wake up on time. Never the less, if you start your prayer and finish one Rak’ah before the sun rises, you have prayed Fajr on time. If you woke up unintentionally after sunrise or just as the sun was rising, you must pray Fajr immediately.