Yes, this story is mentioned in the Puranas.
Prajapati made Devas, the sons of Aditi the partakers of the share in the sacrifice but Daityas and Danavas harassed Devas due to their enmity. They won the three worlds from Devas. Devas didn't get their rightful share of sacrifices and struck with hunger.
Aditi was afflicted. She felt distress seeing her sons deprived of sacrifices. She eulogizes sun god. Sun god was satisfied with the prayer and grants her a boon of her choice. She asks him to be born in her womb as her son and ask for destruction of enemies. Sun god says (Excerpt from Chapter 30)
“With the thousandth part of mine I shall be born in your womb. Efficient that I am, I shall, ere long, kill the enemies of your sons and become delighted”.
Having spoken thus, lord Sun vanished thereafter. Having secured everything the had desired she ceased from her activities in pursuit of penance.
In order to fulfil her desire, Lord has entered the womb of Aditi through one of his thousand rays Sushumna.She performed many holy rites with concentration and purity. Thereupon
- “I shall conceive this divine foetus with great purity”
that she performed those holy rites. Thereupon Kayapa spoke
to her, with words full of wrath.
35-37. “Why do you destroy the Egg of the foetus by observing a perpetual fast ?‘ Provoked by his query she spoke furiously to him—” See the foetus for yourself. It ii not killed. He will certainly cause a death-blow to the enemies”. Infuriated by the utterance of her husband she uttered these words and discharged the terrible foetus that was dazzling with splendour. On seeing that the foetus had the refulgence of the rising sun, Kayapa bowed and eulogized respectfully in words of high order.
- Addressing Kahyapa the excellent sage arid his wife from the firmament an unembodied voice as grave and majestic as the rumbling sound of the cloud uttered thus :
The Voice said:
- O sage, since this foetus of Aditi was pronounced slain by you, this son of yours will come to be called Martanda.
41-42. He will slay Asuras, the enemies who took away
shares from sacrifices.
The etymology of Martanda means born of Mrita Anda means born of dead foetus.
This is the version in the Brahma Purana
Brahmanda Purana has a slightly different version where sun god was in the womb of Aditi. In the earlier days when Prajapati was desirous of creation, he brought splendour of the three worlds and put it in an egg. Using his yogic power, he put it in the womb of Aditi. The child was inside the egg. He was increasing his lustre day by day. The deities couldn't bear the brilliance of the foetus. They plead to Prajapati (could be Kashyapa since it is said he put in the heart of Aditi. They refer to Prajapati as Brāhmaṇa) to save them. Prajapati took out the foetus and revived it later. When it was taken out of the belly, it resembled a dead lump.
279-283. It increased excessively. The Devas became devoid of splendour on coming to know that the foetus had been evolved wholly out of their own brilliance which had been taken away. They became afraid and said to Prajãpati—”How shall this be to us, (What will become of us) ? O lord, the
strength and brilliance of this (foetus) evolved by you is excessive. How can we exist? 0 perpetual one surely we shall be finished. There is no doubt that all living beings here, both mobile and immobile will become burnt before long. O excellent Brāhmaṇa, consider over this (point), withdraw the strength and splendour deposited within the egg so that it will be conducive to our welfare. The renown and potentiality of the splendour burns all round rapidly.
284-288. After reflection, the lord Prajāpati pulled it off. He infused strength in the egg. Then (he child was within the egg. They say that what was the infused strength is the egg The brilliance is considered to be the child. When it was taken out of the belly it resembled a dead lump. Thereupon, Prajāpati examined it, and split the egg into two. Placing the two pieces
(side by side), lie saw in one of them the foetus overwhelmed by weakness. It was however full of brilliance. At once he lifted it up and placed it in the lap of Aditi. He said—”He has the state of being born of Aditi. Since he was born dead (Mṛta) as an egg (aṇḍa) Savitṛ (the sun) is called Märtanda by the learned men.
Chapter 7, Upodhgāta Parva, Madhyabhāga, Brahmāṇḍa Purana.
Then Lord Brahma increased the brilliance in the dead child. This breaking of one egg resulted in two egg shells.
Prapitāmaha (the great grandfather, Brahmā) created more brilliance in it. It is considered that what were the two egg-shells, had got very great power (i.e. the strength of the egg-shells was great).
The lord placed them separately in her navel and gave them to Irvāti. With a wish for procreation, he stuffed them into her belly.