I'm dx'd with bipolar. I'm also absolutely certain my writing isn't tied to the bipolar. There were several years after my symptoms became severe enough for dx before I found a decent doc, and a couple more years of experimenting with different combinations of meds until we found a combination that allowed me to be something other than a zombie, suicidal, severely manic, or practically mentally handicapped (to the point I couldn't write a check, pay a bill, hold a business conversation, follow a recipe, read a novel, follow a tv series).
In that time, I started a few novels, wrote a couple thousand words, then promptly forgot what I wanted to write. Looking back, I have only vague memories of that period, but the amount of time I wasted is incredibly frustrating - and I know the time wasn't actually wasted, per se, but it feels that way.
Having lived with those demons having free reign in my head, I'm absolutely certain there are no similarities with my characters living their stories in my imagination.
A couple of folks have mentioned imagination as universally human, and I agree that at least most humans have some form of imagination. But I've also seen animals exhibit imagination. There's nothing quite like being on a young, half trained horse's back when he imagines there is a bear behind the clump of grass. Young rats seem to pretend to be parents, even when they're not part of a colony where they're expected to help with the care of the young. I've seen them force another smaller rat to try to nurse, and cradling them they way mother rats do neonates.
So I don't think imagination, in one form or another, is exclusively human. We just happen to be the only ones capable of writing our imaginings down.