Could be lots of things. Worms? bacterial infection?
My mare (the one in my picture) had very similar symptoms. She had an intestinal infection of some sort. She would act as if she was in pain, and paw, hunch over, but she would just lay down and fall asleep. Sometimes she would start to lay down, then stand up and keep trying. once she was down, she woul lay out flat and stretch her legs out for a few minutes. then stand up a few minutes later. she did this all day long for three days. she had a fever (102-104.5), and her heart rate was up (52). wouldnt eat. stood around lethargic. Also, what does the manure look like? Is it normal?