Yes.
In one of my older campaigns, one PC got himself a broom of flying and only set back down to the ground to sleep. Even that was after I ruled that, monk or no monk, he couldn't trance on the broom. Beyond some kind of house rule about riding limits, there's no reason a character couldn't stay on the broom until removed or exhaustion sets in.
On the topic of reasons to force a character to not live on the broom: nothing in the description lists specific ways to do so, and following the rule of thumb that Magic Only Does What it Says it Does, there is no written reason a character couldn't stay up indefinitely. There are plenty of unwritten ones, however, the most obvious of which revolve around the fact that other than its magical ability to fly, you are still dealing with a broom.
Sometime, just for fun, set a sturdy broom up between two chairs. Try to balance on it, sitting with your legs wrapped around and firmly gripping the broomhandle. Then, after you climb back off the floor, you can note that such a task is quite difficult. Note also that a broom of flying makes no mention of its user's ability to balance- you could easily fall right off.
But a broom of flying is in motion! Maybe it works like a bicycle, and is difficult to balance on while stationary but becomes easier once you start moving. So test #2: grab a bicycle, name it "broom," and remove the handlebars, because brooms don't have handlebars. Now ride your "broom" down a hill, and may various deities have mercy on your soul.
Is this, then, the intent of the broom of flying? Is it to be a small, sturdy stick that, yes, flies, but gives you no inherent ability to ride? Or is it supposed to be an inexhaustible source of flight that will magically hold you up as though you were glued to the stick?
The answer is in the middle. Where exactly in the middle is up to the DM, and making judgment calls like this is literally part of the job description. My own judgment call when the brooms are broken out is that they are not as useful as a flying mount would be- you have to hold on with both hands to keep from falling off, for example, so only certain annoying monks can make attacks from atop a broom. I also state that if the action you want to complete, such as taking a nap, couldn't be comfortably accomplished on a broom sitting on two chairs, it's not going to suddenly become easier once you're several hundred feet up. And in light of these interpretations, it is my opinion that remaining in the air "indefinitely" is not going to be the same as "forever."
But should some smart-aleck PC string a hammock from the broom in mid-air and go to sleep? ...I'm rolling for a thunderstorm. That fellow is coming down, one way or another.