Your cactus is not getting enough direct sunlight, and therefore is etiolating. This means growing thin because of lack of enough sunlight. Because it is so thin it starts to droop, it is not strong enough to hold it owns weight.
Best thing to do is to prune your cactus, I would say keep the lower 1/3 part. And most importantly give it direct sunlight, at least 6 hours per day during spring and summer.