Y can't he preform

Me and my boyfriend have been together 9 years I'm 24 and he's 31 we have 3 beautiful children together . That last 2 times that we have gone to have sex he cudnt get hard . It made me feel like shit he's been distance a bit from me since . Is it because he's not attracked to me no more ? We have had a Very rocky 9 years splitting up getting together the last time we split up he propa put up a fight for us to get back together . I just don't kno what to think it's getting extremely down x