Define unreasonable demands. What you see as unreasonable may be reasonable from a different perspective. You may need to adjust to the standards of the person above you (who is after all the one responsible for the results) or move on.
However, with a person like this who wants to ignore what you say when you object in person, always follow up the conversation with one in writing. You may need to work on how you present your objections. Remember the only person in the relationship whose actions that you can change is yourself. If you want differnt resluts, you need to do things differently.
Keep your side completely neutral. Explain why something is unreasonable with facts. For instance suppose the deadline is unreasonable. You point out that the deadline will not be met because there are X hours of work time available and x tasks left to do which will take x hours. For deadline issues, always point out this problem in writing and as soon as you know the deadline is not reasonable. Ask which tasks you can eliminate (or push to a future sprint) in order to meet the deadline or what to do. It is the PMs job decide how to resolve the problem and you are giving him or her facts to allow a good decision to be made. He is the one who will look the worst if the problem is not solved and the deadline missed particualry if he chose not to pass the bad news up the chain.
In particular do not use emotionally charged words like impossible, unreasonable, stupid. And do not lose your temper. You are providing information, His.her job is to make decisions. It is not your job to agree with the decisions but to do your best to make them work. And timing is critical, get in your points before decsions are made or announced outside the group whenever possible. Telling someone that a deadline that has been promised to a client cannot be met is a much harder sell than before the client is told.
Now if you followup with reasonable suggestions about how to handle the problem and with facts concerning why ther problem exists in writing, you can never be successfully accused of not talking to the PM first before escalating an issue because you have proof that you did.
Now escalating is tricky when it is your direct boss. Sometimes all it takes is adding his boss to the email chain after several go-arounds. Sometimes you just have to accept that these people are not going to change and to move on because you will get no support from above.
Sometimes it is best to let the chips fall where they may and let the project miss its deadline, and bring up that you objected to the deadline in writing during the post mortem of the failure.
Usually before you escalate, you should tell the person that you are going to escalate and why and ask for a meeting with all three of you to explain your position. It is best to go into such a meeting with a "how can we work it out" attitude rather than an adversarial one. If you have to escalate something to your boss's boss, you want to be the one who sounds reasonable not the one who sounds like a raging idiot.
Remember that it may not be the PM at fault here, the actual decision you object to may have been made by someone higher up the chain and he/she is stuck with it too. So be caerful what you escalate - make sure it is something mission critical and something that is, in fact, not possible, not just something you don't like.
No company likes having a constant complainer, they also don't like failures due to people being afraid to tell them the truth. It is a fine line you are walking here. That is why it is critical that you only bring up mission critical issues and let minor disagreements go. Anytime 2 people work on the same project, there are going to be professional disagreements. You need to learn which battles to fight in order to be effective. You also need to be seen as cooperative and willing to make the effort the rest of the time.