I think it depends. If that's going to be a regular event, then you'll probably pay hourly. But it might also depend on the nanny. I nannied several years ago, and I occasionally stayed the night. If I stayed the night, it was in addition to my normal 12 hour day. I was paid hourly from 6:30am-7pm. Then I took a break, and came back at 10pm. I was paid a flat rate from 10pm-6:30am, then back to hourly. The flat rate was less than hourly, but I still thought it was a fair rate. We came up with the flat rate together (this only happened when one of the girls was sick in the hospital, which happened a couple of times).
Or you could pay a flat rate per week, but adjust it if the nanny works more or less hours for any given week. But be specific when discussing this, and include it in your contract. Hope that helps!