On a long flight you need to take some extra precautions.
Make sure your neck is supported adequately. Use a pillow to support the lumbar region of your neck and keep it aligned parallel with the center of your seat.
You can roll up a sweater or blanket to support your lower back.
Walk the aisles every 30 minutes to keep your blood circulating. If you have room, stretch out your hamstrings and hip flexors to ease tension in your lower back.
Move your ankles and toes regularly.
Make sure your shoes aren’t too tight. Loosen or remove them if possible. Just make sure you have something to wear when you get up to walk around.
Drink plenty of water and avoid alcohol. Flying dehydrates your body and the high altitude promotes drying out of the skin and mucous membranes. Alcohol furthers that dehydration.