Drawing legs up is a kind of instinctive thing babies do when they cry - it doesn't necessarily indicate cramps or discomfort.
However... you are her mum and know her best. If you think she is in discomfort or pain, and that it's feed-related, then you might want to look into it further. One possibility is that she's eating too much in one sitting. How much formula is she having in one go? 6 feeds per day (if I understand you right) is not many for a baby of 4 weeks old. Most fare far better with a little and often approach. Some babies continue glugging away at the bottle after they're actually full because they like to suck and can't do so without drawing down milk too. IN which case, a dummy might be your answer.
Alternatively, She may, just may, have an intolerance to cow's milk protein (not lactose) but you would probably expect other symptoms with this too. Is there any family history of allergy? There are special formulas available where the milk proteins are broken down (hydrolysed formulas) and these may be worth a try. You can either buy them in boots on special order (£££) or get them on prescription but your GP may be reluctant to prescribe.
It could just be normal 'colicky' behaviour - IME this is usually worse in the evenings, and cranks up majorly around the 6 week mark, before gradually subsiding. Many babies (mine included) don't sleep well after about 3-4 am for some reason, crying out, wriggling, and waking frequently.
I hope you get some relief soon. It's horrible watching them upset.