While the film's story took inspiration from the above mentioned comic, and all plot/story aspects of it aside [the "inner conflict" aspect being thematically poignant], the likely physical reason was Peter subconsciously suppressing his own abilities,over any physical malady. It was a semi-clever way of highlighting Peter's challenge accepting the responsibility of being Spiderman.
Peter Parker being normally "conflicted" about his life as a super hero is a common story thread; in several comics, he outright complains how being Spiderman does nothing but bring him further complications! One of the core elements of the character's relatable nature and likability is that this everyday, ordinary guy still has problems---- even ones made worse, ----- due to having to divide his time between super heroics and every day life. Colds, skipping appointments, keeping up his grades,running out of resources, ticking off his friends and missing dates were all common examples of this conflict.
Never once in the other media though, not even when he lost Mary Jane and Aunt May was injured, did those instances effect his mentality which impacted his powers in anyway. But, concurrently, pure physical sickness has been known to affect his powers now and again.
In the 1981 Spiderman cartoon, Peter had to fight the Lizard while dealing with a persistent cold ( what he would later find out was actually a reptile allergy). While it didn't "slow him down" or weaken his powers, so much, it did make him somewhat "less sharp" and cause some clumsiness with his abilities, due to the sneezing and such. Peter even says so himself:
"This cold is the worst! It's making old Spidey look like super clutz!" Seen here, at 6:35:
While its been established that Spiderman does have heightened metabolic processes and faster healing, he's nowhere near Wolverine level; he can still get sick with common viruses, and needs some rest to recover or function at full strength. Peter's body is still base human, so those types of illness can drain even his strength more than usual. This can leave him functioning at anywhere from 50- 75%, but it doesn't make him "lose" his powers.
This has been a thing even since his early days in the 1960s, seen in this cartoon. It's not said that his powers are affected directly, but Peter himself alludes to being more tired than usual, especially because he's sneaking out to fight the Rhino:
That wasn't the case in the film though; it was implied that Peter himself was essentially "suppressing his abilities" [not an actual "mental block", but more like his body reacting to subconscious inhibitors due to the mental conflict he was going through.] This did not fully take, though, because in the scene in the film where Peter jumps off a building to re-test his powers, he sustained no serious damage or injury, as seen here:
Considering this was easily a 6 story fall, even with the clothes lines slowing his decent, there is little way in which an average human would have walked away from those impacts with little to no injury. Mind you, this is only speculation, but i believe his powers [specifically, his durability] was still functioning for Peter to not be more seriously harmed from such a scene.
Keep in mind, Peter is not Gladiator; his power levels, canonically, are not affected by his level of self confidence.... though they can, like most people, be temporarily "amped" by his in the moment intention, focus, mood or physical condition. This movie took some liberties with that, to the extent that his subconscious mental condition was actually "seeming", to him at least, impact the functionality of his spider DNA. Interesting for story purposes, but not really [in my opinion] a well thought out plot device, because it left the door open for Peter "slipping out of spider mode" if he ever entered a state of depression.