If I've had several drinks (alcohol), I never sleep for 9 hrs, it's always less, but I haven't tracked post-alcohol sleep times closely enough to notice if it's still a multiple of 3.
However, I can also do 6 hrs or 3 hrs, and I don't feel groggy but I'll get tired sooner the next night. Not adhering to a multiple of 3 hrs (rem cycles I assume), or reasonably close to that, ends up badly.
What I really need is an alarm hooked up to a primitive EEG so that it can start the clock when I fall asleep, and set off an alarm after a programmable number of minutes. That way I could sleep for 6 hrs without ever being groggy. But even the cheapest EEG stuff I've seen connectable to a computer is not cheap.