Many details will be worked out on a case-by-case basis to suit the needs of the household.
It is encouraged that the dog sleep nearby the bedroom so that they can assist with reminders such as to wake up, hydrate, or find the toilet.
But, also Assistance Dogs Australia have had some success training dogs to sleep beside or even on top of people that have difficulty sleeping at night. The presence or weight of the dog can support sleep for these people.