Pains in legs after drinking alcohol is usually due to build-up of lactic acid in the muscles. It may also be due to dehydration
resulting in electrolyte imbalance
, as many people forget to drink water while on a drinking binge. Also, alcohol itself is dehydrating as it increase urination. The best solution for both causes would be to take lots of water and keep yourself hydrated and to cut down on your alcohol intake if possible.
Hope you find this of help. Best wishes.