I consider this to be at best a supplementary answer to Lightness Races in Orbit's excellent straightforward answer (I left essentially a three phrase version of this as a comment there, contexted as the difference between creepy and not), and as such it's intended to answer any lingering "but what if I just...?" (such as: "but what if I just want to warn my coworker about their boss noticing them doing this").
What can you say?
What your colleague does (particularly on break, in private) is precisely... none of your business, as many others have repeated. How long they are not at their desk is also not your business. Why they are not at their desk is not your business.
What is your business, and what you can bring up with your coworker, is interaction you have had or directly observed going on (and when I say directly, I mean actually what you saw or heard, not what conclusions you then assumed about it).
If their boss comes and asks where they are, you can relay that to your coworker. "So-and-so was asking for you, I didn't know where you were so that's what I told them". Don't speculate about where they were. Don't speculate to anyone else about where they were. Don't speculate about anything. For example "So-and-so was looking for you, I bet they're annoyed at your 1 hour bathroom breaks" is you purely assuming and speculating on the latter half. Don't do that.
Being a friend at work or at least a good coworker starts and ends with not pushing in uninvited on personal issues (not to be mistaken with offering support in a way that doesn't push), which is absolutely what's going on when it's a peer (or under a lateral reporting structure) and not your report. Whatever your coworker's 1 hour bathroom(?) breaks involve is between your coworker and their boss and HR. You have no knowledge of whatever arrangements they have made, and such arrangements would not be any of your business if they existed.
If something about your coworker's performance is affecting your work, then that is up to you to address with your boss, but I would caution to keep it to the direct facts of what is having an effect, NOT your assumptions about what is behind that.
"Coworker isn't keeping up with deadlines" is a direct fact. That's what you need your manager to deal with for you.
"Coworker isn't keeping up with deadlines because of 1 hour bathroom breaks" is your speculative assumption, and as someone not managing that person, not your call to make, and WHY your coworker isn't keeping up or is causing bottle necks for you is something for your manager to figure out and figure out how to resolve, not you.
Whatever you can do to let go of this interest of yours in your coworker's related time is in your best interest. You're not their boss. So if their boss has taken an interest, yes, you can communicate that actually observed interaction (not your subsequent assumptions/speculation) on the part of their boss. If it's affecting you directly due to workflow, you can in turn address that. But don't turn this into you trying to clock watch someone else at work who isn't your report, and seriously don't turn this into speculating about why they're gone for so long.
We're all human and curious
...but this is the type of road that, professionally, you're better off turning away from. This is one of those cases that for everyone involved, about the best thing you can do is to keep things professional about this, in context with what your role actually is (e.g. not being their manager). I realize that there's also a strong "fairness" sense that can impact here, which is also one of those very human things (fairness is one of the earlier psychological social constructs to develop, showing up even fairly early in babies) but ultimately you need to find a route to letting go of your concern over that however you possibly can, because you simply don't know everything going on, it's not your place to know, and it's not your place to handle it. Quite simply whatever's going on may even be quite "fair" in context and regards to you, if for example it involves a medical issue on the part of your colleague... but ultimately, regardless, you have to figure out how to resolve your feelings about the situation and whatever is driving you to take such a deep interest, so that your own feelings on this can quit impacting you (which they clearly are, even if only to the extent that you're now clock watching a coworker).
What if you're simply genuinely concerned about your coworker?
Then keep that conversation focused on offering support, without prying. But don't mix it with "hey I think the boss is on to you".
"I just want you to know, if you ever need anything that I can help with, I'm here for you" is one way to word that which doesn't involve essentially saying "hey I've been stalking your bathroom breaks".
It's also low pressure, because you're not assigning anything that then needs a refutation or asks for some kind of direct answer, such as "Is everything ok?". It's pretty easy to answer "Thanks" to that if they want to drop the conversation. If they don't continue the conversation, drop the conversation. The point was to being actually supportive, not prying. And this is supposed to be about them, not you: yes, letting go of your interest is hard, but if you actually care, that's what you need to do.
If they then ask "why are you asking", that's an appropriate time to mention, simply, that you've gradually noticed that they seem to be away a fair bit (or, as a better point of focus, that you've noticed that they seem to be struggling to meet deadlines), even though it's not as if you're keeping track, and you don't know why and it's none of your business, but you do care about them as a colleague so you wanted to express your support if there's anything going on they might need help with.