It most definitely can, especially if the side you are sleeping on has your sensitive ear in contact with your pillow. When you sleep on your affected ear side, the weight of your body tends to exert pressure on the sensitive ear. This presses on the outer part of your ear, which causes it to swell and therefore results in agonizing ear pain.
Sleeping on the good ear however, with your affected ear lifted above the rest of your body by being plopped against multiple pillows, tends to be a favorable sleeping position for individuals with ear pain.