It sounds like they are stretching due to your lighting being to far away from them or just not putting off enough light or not enough of the right light spectrum the plants need.
Your three basic options are, after lowering your lights if they are to high or adding to or replacing your lights if they are not putting off enough of the light spectrum your plants need are to loosely stake them up, to add a small fan to blow lightly on the plants because the swaying motion will cause them to build stronger stems. It is the wind in nature that causes trees and bushes and plants to grow thicker trunks and branches and stems because as they sway the plant or tree or whatever senses it and creates more growth in the weak areas to then be able to withstand the stresses the wind puts them under. Or you could, if growing in soil, repot your plants so most of the now exposed stems are in the soil leaving just the tips of the plants above the soil. New roots will grow from the then buried stems and that will help to increase your overall root structure but if the stretching is due to your lights being to far from the plants or not enough of the correct light spectrum the plants need they will just stretch again.
My suggestion would be to lower your lights, after making sure they are giving your plants the correct light spectrum, and then loosely staking up your plants and adding a small fan to blow on them so their stems grow thicker and stronger. Of repot them deeper and lower your lights after making sure they are putting off the correct light spectrum your plants need.
What type of lighting are you using? What total wattage do they put out? How far away from your plants are they?