Yes, on 3rd flight post PPL
Just bought my pride and joy and was flying it home when all electrical power was lost - subsequently found to be an alternator failure.
Radio failed, but by switching everything off I managed to get enough power back in the battery to then make a mayday call to Wattisham saying I was heading for Cambridge and to warn them of my approach.
After acknowledgement switched everything off again leaving just enough juice in the battery for radio contact to be established at Cambridge.
With hindsight maybe more a Pan than Mayday, but it got me on the ground safely.