I haven't really noticed a trend on my teams with fouling more often at the end of the game, although something similar did happen to me a few days ago.
In real life basketball, the ref would be less inclined to call a foul at the end of the game, especially if you're team was on defense playing at home.
One reason may be that your team is fatigued towards the end of the game, which would result in more fouls.