The lonely astronaut vs the irritating noise

I’m trying to identify a story. My googlefu is failing me. I’m pretty sure it involved one character telling the other character this story as a parable or metaphor, but I don’t remember the framing story, or whether it was a film, show, book, short story, or comic book unfortunately. It went something like this:

My Google fu is failing me

But basically, and told much less poetically, a man is alone on a spaceship on an endless journey.

Unfortunately there is some kind of subtle noise he can’t locate the source of. Normally not a big deal but in his isolation and boredom it starts to become all he notices and it starts to slowly drive him insane.

He goes through various stages of resistance and anger and frustration.

But finally he relents.

Gradually he notices his foot tapping.

Over time the subtle rhythm begins becoming the seed for his imagination to become coauthor to a million epic internal symphonies.

Any ideas?

I don’t know the story, but I got a huge laugh at the ending because I have caught myself doing that a few times at work. I’ll have my foot resting on top of the roller on my office chair, unconsciously tapping my foot, and I’ll hear this tapping/squeaking noise coming from somewhere, and just as it starts to get really annoying, I’ll suddenly realize it’s me. :smack:

I was once on an army exercise, in the field at night, having not had much sleep, walking around the campsite trying to track down this odd hissing noise I kept hearing but couldn’t seem to locate. It turned out the rechargeable electric razor I had in my pocket was running.