I think it first starts with sleeping in unconventional locations. Well, technically, the problem didn’t arise until waking up in an unconventional location. We aren’t sure what exactly happened: maybe bonked his head or just forgot that he fell asleep in close quarters and having a moment of claustrophobia. On waking he was very, very sad.
Dad had to come extract him from the impromptu bunk bed and then there was a long period of sadness. Eventually we found something to take his mind off of the past worries.