Yes, that is possible.
However, please note that this may lead to faster wear of the cable.
The extent of cable wear mainly depends on the steepness of your ceiling and how often you adjust the height of the luminaire.
You can find more information about cable wear here.