When Germany and Japan invaded other nations, several resistance movements sprang up immediately and persisted for years until the war was over. Polish resistance, French resistance, Russian partisans, Filipino resistance, occupied Chinese resistance, Korean resistance, etc.
... where was the German and Japanese resistance when the Allies occupied their country? The Axis powers seemed to basically just lay down and surrender in 1945. Why didn't civilians and former military personnel rise up - bomb Allied transport trains, disrupt Allied communications, sabotage supplies, incite riots in cities, and such?
Neither the Japanese or Germans totally rolled over, but the resistance movements in so many words, failed pretty badly.
Japan: There was an attempted coup to prevent Japan from actually surrendering by seizing the surrender proclamation recording and then convincing the Emperor to continue the war. The coup failed, the Emperor remained in favor of peace. There were several other attempts to continue resisting (a final flurry of kamikaze attacks, smaller coup or refusal to go along with surrender), but most were manifested as strictly suicidal actions, or were talked down by other pro-peace factions. Ultimately most Japanese military and citizens obeyed the orders of the Emperor to "bear the unbearable" and surrender in good faith.
Germany: Even as the war was simply going bad for the Germans, there was an attempt to set up what we would refer to today as a "stay-behind" organization of Guerrillas that would continue the war in regions occupied by the Allies and Soviets. This organization would be called "Werewolf" and on paper, made small cadres of fiercely motivated Nazis well equipped with the tools to raise hell. As the war got worse their mission shifted from simply resisting in occupied areas, to continuing the war after the surrender.
This was, of course, on paper. In practice many of the recruits for Werewolf where less than enthusiastic and opted to surrender when they had a good chance. Further much of the equipment allocated for operations was some combination of broken, old, or badly located (much of it was found by the Soviets/Allies).
Ultimately the only for sure confirmed Werewolf attack was murdering the pro-American mayor of Aachen after it was occupied. While other successes were claimed, virtually all of them were attributable to other causes.
Here's some other factors to consider:
There was no "free" Axis country remaining. In the face of massive Allied and Soviet military strength, it was fairly absurd to imagine an insurgency being able to realistically expel any of the occupying powers, not would there be any kind of support from elsewhere.
There was a massive shortage of food and basic living supplies in both Germany and Japan. In practice it meant the only way to reliably eat or not freeze during the winter was to cooperate with the Allies...who on a whole were quite reasonable when it came to not antagonizing the locals (outside of the Soviets, but we'll get there).
Partly because of the propaganda that came from the Werewolf program, and in Asia, the experience of fighting the Japanese, the occupying powers not only were ready for an insurgency, they expected to face strong, uncompromising resistance on a scale that historically never occurred. What this meant in practice is the Allies were quite aggressive in security operations/counter insurgent operations, while the Soviet just came down full scale massive oppression (including re-opening concentration camps in places to stash resistant/just not communist enough Germans!). For the already weak, poorly organized, and equipped Werewolves, this was problematic to say the least.
Both the German and Japanese were basically crushed by the Allies, and crushed extensively. A very large portion of the German/Japanese population just wanted to go back to not having to worry about being napalmed and eating regularly, and were very disinterested in seeing the war drag on with terrorist acts.
For more reading:
The Rising Sun: The Decline and Fall of the Japanese Empire by John Toland is an excellent source for the Japanese side of the end of the war (and the start for that matter!)
Armageddon: The Battle for Germany 1944-1945 by Max Hastings is also a great insight to just how Nazi Germany disintegrated, and a good look into why the prevailing attitude was fatalism vs resistance on the part of the Germans.