You yawn when you're sleepy or bored.

Literal

Sleepy time [and-や] bored time [at-には] yawn [subject-が] comes-out.

や connects 時 ('time, occasion') non-exhaustively — 'times when sleepy and times when bored and similar.' あくびが出る ('a yawn comes out') is the standard collocation for 'to yawn.' Observation on behavior.