First, you really need to get them off of the iceberg lettuce, as it can cause gastrointestinal problems and is toxic to guinea pigs in high quanitites. Green leaf and romaine lettuce is the safe lettuce that is fed to guinea pigs.
Next, due to the fact that she is laying on her side, and has lost use of her back legs, leads me to believe that she may have an injury to her hip. This could've been caused by her wiggling around while being held or grabbed. There is a chance that there could also be nerve damage to her hip, or even her back.
Another possiblity, especially given her age, is that she suffered a stroke. These are common in guinea pigs and small rodents, unfortunately. The symptoms usually appear as leaning torwards one side, and loss of mobility in the hind legs.
If it is indeed a stroke, there really isn't anythng you can do at home, without seeking medical treatment. In the meantime, make sure to keep her comfortable, and that her food bowl and water bottle are easly accessable to her without her having to reach much for it.
Unfortunately, either possibility really needs to be checked out by a veterinarian. 4-5 years old for a guinea pig is up in age, but not terribly so. I have two that are 6 years old, and are as active as ever. They can live as long as 10 with proper care.
Any time an animal loses mobility in their hind legs, indicates that something severe is going on. A veterinarian will need to examine her in order to diagnose, or rule out, any potential illness she may have, and determine an appropriate course of treatment.
Hope this helps!
__________________
I am NOT, nor do I claim to be, a Veterinarian.
Always check with your vet for any symptoms your pet exhibits.
Please press Accept if you find my answer helpful.