Ideas:
--Try getting in a warm tub or shower with him. Hold him in your arms and let him splash while you hold the compress over his eye from behind.
--Get an audio book. Play it in the dark at bedtime while you hold him in your lap and hold the compress over his eye. If it is totally dark and he can't see anyway, maybe he won't feel the need to wiggle so much.
--Maybe try covering both eyes instead of just one eye. Having both eyes closed and gently massaged can be kind of relaxing, but one eye seems like it would be weird and annoying.
--Explain to him what you are doing and why. Draw a simple picture. "Something is stuck in your eye and we need to get it unstuck so your eye doesn't get sick." Show him and practice with a teddy bear.