For the Quran; first understand why it was revealed; you can do that by understanding what happened during the time that a particular verse was revealed. Read and understand the story associated with the particular verse.
And for hadith; understand why the hadith was revealed, what the hadith seeks to achieve and all. For instance; bending down to pee for males, we all know the main reason for that was to prevent pee to soil our clothes. That should let us understand that there are instances when we can actually stand to pee (using the WC For instance)