N.S.
My stepdaughter does this because she thinks she can't do it and she's afraid of failing. For example, she really wanted to sew a skirt for her dolly (she's 8) and couldn't wait and couldn't wait. She stitched two stitches and then declared it was "boring" and "she didn't care anymore." Well I knew she did care! She will declare things "boring" or she's "not interested" if she thinks they are too difficult. Sounds like your little 5-year old might be similar in personality!
Ignore the negative talk and don't try to handle what he says. If he says "it's boring" and you try to show him how exciting it is he won't respond because you're not handling the right problem. He doesn't think it's "boring" he thinks it's too hard or that he might make a mistake. Instead try to see what he is really worried about and give some encouragement.
When my SD said her sewing was "boring" I said "you're doing so good! I think you're the best at this, certainly better than other girls your age! Look at what you did so far! Is there something you're having trouble with? Can I show you again?" And what do you know, I showed her again how to do it and suddenly she was all smiles and eager to get sewing again.
(My SD is also a wise-cracker and a clown. She does this when she's unsure of herself. She tries to be funny to draw attention away from the fact she can't do XYZ. It's hard to see this because she LOOKS like she has a lot of self-esteem because she's talking and laughing and being the center of attention. In reality, she doesn't, hence the clowning around.)
Good luck!