A quick Internet search told me that Joshua is suffering from a sleep disorder called Somnabulism that is characterized by walking a few meters from your room to wherever place your feet will take you. It usually occurs when the person's
brain waves become larger than normal (perhaps like tsunamis) or he moved into deeper sleep. There will also be times when the sleeper talks while walking. Good thing Joshua doesn't mumble while he sleeps or else my secret will be found out.