What causes legs to ache after laying down in bed. Sometimes sharp pains?

Restless Leg synd... In older people, but in younger people its very rare. Fortunately, there are some simple treatments. Circulatory or neurological causes are common, and your doctor should be able to help figure out the cause and the treatment.