Difficulty with Posture I am noticing some pattern in my recent practice. I find that mental exertion, as directing attention to the breath, is quite easy for me; yet, when it comes to devoting an amount of time to formal practice, or even sitting formally and upright, I have trouble. For example, I will tend to meditate in a slouched or even lying position. 

EDIT: There is no pain, or specific problem when I meditate upright, just a sensation of general discomfort, or an unpleasantness. But, I feel maybe it is more of an aversion towards sitting upright than an actual physical problem. 

My question is: How can this resistance best be explained? What is the best way to counter it?

Thank you.
The experience of discomfort and unpleasantness themselves can be great meditation objects, and it is mindful that you are distinguishing them from pain. Some traditions and buddhist communities expand their conception of formal sitting to include sitting in chairs with back support and lying down, so if it is of interest, know that there are paths that provide such options. 

As to how the resistance can be explained, it may be fruitful to consider how your mind and body have been conditioned to relate to sitting and the time you are devoting to sitting (i.e. saṅkhāra meditations can help). For many people, such explorations illuminate habits and valuations that can themselves be fruitful meditation objects. 

In terms of counter acting the experience, you'll probably find most teachers encouraging you to grow more curious about the experience. For example, if discomfort is arising from the experience of the stillness, you can examine the nature of the stillness. For instance, you might begin to noice that the posture is not really a static pose, even when you remain quite still. Blood is coursing through your veins. Air is moving in and out of your lungs. Electrical impulses are happening throughout your body. I would encourage you to examine the nature of your discomfort and allow that to guide some portion of your meditation practice.