Upvote:2
A Bhikkhu is restricted to max. three nights sleeping under the same roof with lay-people, better Non-Bhikkhus (which incl. novices and some Nikayas incl. animal as well).
"Under one roof" is also seen often differently, sometimes technical in regard of roof seen, sometimes as matter of touch each other ("privacy"), as the origin story suggest that it's a matter of danger of lose of respect toward monk(s) if seeing ordinary things while he sleeps...etc.
As for the practice (for those in training) it's actually not good for Bhikkhus (but also for others after Paths/fruits) to spend even short time in near association with "non-likewise" or "lower".
It's how ever great goodness if a mature Bhikkhu let a non-Bhikkhu dwell near for a while.
General is near association, living near, with householder and real novices not good and often encouraged to avoid by the Sublime Buddha, not to speak of improper association or dependency.
[Note that this isn't given for stacks, exchange, other world-binding trades but for escape from this wheel.]
Upvote:2
A monk may not spend more than 3 nights with a layman (Theravada vinaya). However...over time, some traditions have managed to find loopholes in this to deal with some practical difficulties (for example, a temporarily crowded monastery where some laymen need to be housed in bhikkhu quarters or vice versa).
The loophole I have seen used is this: It's not considered "spending a night" if one of you leaves the dwelling before sunrise. In this way, the 3 day limit has been extended indefinitely. Some orders are fine with this, some don't like it.