It's a factor in so much as Paddington-Penzance is about 5.5 hours on a day train, which is just about palatable. London to Inverness is something like 8 hours and London to Fort Bill is in excess of 10 hours (incl a walk across Glasgow). That'd be pretty tedious on a day train and thus makes the Sleeper option for those sorts of distances a much more attractive alternative. Thus higher demand and higher prices. The longer distances (and change of traction / splits) of the Caledonian Sleeper also make it a much more costly operation to run. Even as a 'normal' passenger you'd probably appreciate that a single train running for a shorter distance is much cheaper to operate than multiple trains (in effect) running over much longer distances with all the extra operating costs that incurs.