Elevating your legs while sleeping is not bad.
In fact it's a good thing to elevate your legs while sleeping as elevating your legs helps to relax you and keep the blood flowing properly through your veins.
Elevating your legs while sleeping or resting is a good way to prevent blood clots and reduce your risk of developing heart disease, heart attacks, strokes etc.
When you sleep with your legs elevated it's a good thing because having your legs elevated while sleeping or resting actually and literally will take a load off and works to rejuvenate your body by pumping venous blood back toward the heart and other vital organs.
That's a great thing because as the blood circulates to these areas, your body will feel more relaxed and peaceful and healthier.
People with heart conditions are advised to elevate their legs when resting and sleeping and even when you just have trouble with blood clots it's recommended by doctors to elevate your legs such as in a recliner on the couch or in your bed.
You can elevate your legs with a pillow or two which is a good thing or use a wedge to raise your legs up.