Castle in the air - Jones, Diana Wynne (Greenwillow Books, 1991)
Having long indulged himself in daydreams more exciting than his mundane life as a carpet merchant, Abdullah unexpectedly purchases a magic carpet and his life changes dramatically as his daydreams come true and dangerous adventures become daily fare.