When the person sitting next to you is sleeping, there are times when you wish that person could fold in their legs a little bit.
ご質問ありがとうございます。
"When the person sitting next to you is sleeping,"=「隣に座っている人が寝ているとき、」
"there are times when you wish that person could fold in their legs a little bit."=「その人がもう少し足をひっこめてくれたらいいと願うときがある。」
ご参考までに。
「足をよける」ことは次のように言えます。
ーto move one's legs
ーto move your legs out of someone's way
例:
Sometimes the person sitting beside you on an airplane is sleeping, so it's hard to get them to move their legs.
「時々、飛行機で隣の人が寝ていて、足を避けてもらいにくい時がある」
to get someone to move their legs で「人に足をよけてもらう」
ご参考まで!