I would much rather that my child was calmly daydreaming than throwing a temper tantrum. I would continue to let him do it as it sounds like it's a source of comfort for him. Encourage, but don't force him to engage in social activities occasionally. It sounds like he'll be ok.
I do agree with margypops.
6 is a weird age. It may well be that's just the way he is. but I am confused by your statement that his daydreaming is having an impact on his learning, because you also said he does ok at school academically? Could you clarify on this?
Is he the youngest of your kids? Are the others all girls or boys? what is the age span between him and the rest?
And you talked about him daydreaming at home. Does this also happen at school? What does his teacher say? This is really very important. It is very important to find out if his teachers opinion matches yours. Please get back to us.
I have known many children who day dream, I was one ,especially as I got older, I would sit and stare out of the window dreaming about nonsense, many times I had chalk from the chalk board thrown at me by a teacher for doing it LOl I day dreamed my way through school and did pretty well in spite of it .So unless he is showing other behavioral issues I think he's okay ..good luck