if elevating her head when she was lying down made a difference it sounds like reflux to me. Go to your doctor and explain this, you need some medication for your little one.
Another sign of reflux in babies is if they are lying on their side they bend their back not into a c shape but like the other way…i really cant explain it…thats what i meant by does your baby arch her back when she is lying down…
but from what you are describing it sounds like your baby has reflux.
Reflux is when fluids from the stomach come back up because the flap closing the stomach is not fully developed. It can be uncomfortable and sometimes painful for babies, but most of the time babies grow out of it without any trouble and there is no need for meds.