I don't know if the dragon going to sleep in another place is a bug, but I've seen this happen a lot.
And about the dragon waking up even if when you walking happened to me like 2 or 3 times. I always put the auto-walk, that way you can't run by mistake. And even so.... the dragon killed me lol (no, no pets).