Geographical variation in behaviour within species is common. However, how behavioural plasticity varies between and within locally adapted populations is less studied. Here, we studied behavioural plasticity induced by perceived predation risk and food availability in pond (low predation – high competition) vs. coastal marine (high predation – low competition) nine-spined sticklebacks (Pungitius pungitius) reared in a common garden experiment. Pond sticklebacks were more active feeders, more risk-taking, aggressive and explorative than marine sticklebacks. Perceived predation risk decreased aggression and risk-taking of all fish. Food restriction increased feeding activity and risk-taking. Pond sticklebacks became more risk-taking than marine sticklebacks under food shortage, whereas well-fed fish behaved similarly. Among poorly fed fish, males showed higher drive to feed, whereas among well-fed fish, females did. Apart from showing how evolutionary history, ontogenetic experience and sex influence behaviour, the results provide evidence for habitat-dependent expression of adaptive phenotypic plasticity.