My DD1 used to be like this. I was driving me nuts until I had her at the drs and he found she had an ear infection. She felt fine sitting up but lying down made it ache. I learnt to sleep holding her slightly upright before we figured out it was her ears. It was connected to her teething and panadol helped with the pain.

I hope you got some sleep last night.