Breastfed baby, night sleep???

Hi ladies just need some advice,

I have a 3 week old baby girl and there has been a few nights where she has slept 6-7hrs at night, i know they say not to let your new baby sleep more than 4hrs at a time without a feed, but i dint really know whar to do when im asleep to?

I set my alarm last night to make sure she didnt sleep more than 4hrs so i could get up and wake her but i just slept threw my alarm, the only way i wake up is if she starts to wake up (bcuz i am so tired)

It has happened about 3-4 nights in the past 2 weeks, can anyone help me with this please?