Do Dogs Protect You When You Sleep?

Do dogs guard you when you sleep?

.

Why do dogs like to sleep close to you?

Do dogs get more protective at night?

Why is it bad for a dog to sleep in bed with you?