I'm sure if you ask the immigration officer in Malta he will stamp the passport. If you're coming from the UK you're arriving from outside of Schengen so there should be border control. Maybe get in the queue for non EU citizens (assuming they have separate channels there) just to ensure the officer will have a stamp to hand.