I'm not sure really.  Once you start getting a little jittery, you should stop.  I drunk some YMCA coffee one time and stayed up for what seemed 2 days.

I try to drink a few ice coffees a day, but it hasn't changed my sleep patterns.