The legend of Lakṣmaṇa remaining awake for fourteen years while Ūrmilā slept for the whole duration can be traced back to two Telugu folk-songs Lakshmana-devara navvu (Laughter of Lakṣmaṇa) and Urmiladevi nidra (Ūrmilā's Sleep).
Here's the summary of these folk songs from the book, The Ramayana in Telugu and Tamil, A Comparative Study by C.R. Sarma:
Chapter IV - The Ramayana in Folk Songs
The folk-authors do not, generally, care for correctness. They are satisfied if the details given are convincing and interesting to them. The story of Urmila; the wife of Lakshmana, can be given as an illustration of this.
The Story of Urmila
After Lakshmana's self-exile to be with Rama and Sita, his wife Urmila falls fast asleep for fourteen long years. After defeating Ravana in the battle, Rama returns to Ayodhya. Then Lakshmana, as directed by Rama, goes to his apartment to meet his wife, who is still asleep. At first, she does not recognize him as her husband. She mistakes him for a stranger and hence warns him against approaching her, saying that Ravana has lost his all because of his evil desire for another's wife. The story goes on further.
It is not known how Urmila comes to know of all these incidents that have taken place in Lanka when she has been supposedly in a deep slumber all the while. The critic may question the propriety in the statement of Urmila, but the folk-author or his audience, perhaps, find satisfaction in her reply since it is factually correct and convincing.
I give below the stories of two songs in Telugu Lakshmana-devara navvu (the laughter of Lakshmana) and Urmiladevi nidra (the sleep of Urmila) to understand better the emotions of the folk-authors. These two may be called twin stories.
The Laughter of Lakshmana
After defeating Ravana, Rama returns to Ayodhya, along with his wife and brother Lakshmana. Later, Rama was crowned in the presence of all the Gods, sages and others.
At the time of coronation, Lakshmana, at one stage laughs which creates a stir among those present. Each one of them including Siva thinks that Lakshmana laughs at him only and hence feels offended. Rama too mistakes the laughter and gets wild against his brother. He, at once, draws his sword from the scabbard and demands of him the reason for his laughter. Then, Lakshmana falls at his feet and explains as follows:
While we were staying in a hut in the forest, one night, you (Rama) were fast asleep. As usual, armed with bow and arrow, I was on the watch. All the creatures in the forest were also in deep sleep. Then I found to my great surprise Nidra devi (goddess of sleep) weeping. I approached her and enquired the reasons to which she replied that though the entire world was sleeping, he (Lakshmana) was awake.
Then I told her that I was in the service of my brother and sister-in-law and so I should not sleep. Further, I requested her to haunt my wife, Urmila, so that she would sleep all through the day and night. Then she left. And again, Nidra devi has come and haunted me today. So, I laughed.
So saying Lakshmana goes to sleep.
On hearing the story, Rama repents and compliments his brother for his selfless service and spotless love for him. He feels ashamed of his haste and desires to put an end to his own life with the same sword he has taken out from the scabbard. But, he is prevented from doing so.
Urmila, the wife of Lakshmana, is one of the minor characters in the Ramayana. It is a pity that she has not received due recognition from both the old and modern poets. Even Valmiki does not say much about her, probably because she is not closely connected with the main story. But her sacrifice and silent suffering have captured at least one Telugu folk-author who has composed a long and moving song in appreciation of Urmila. It is very popular and sung by the women folk in our villages.
To outline the theme:
Lakshmana volunteers to follow Rama to the forests. Sita also follows her husband against the latter's wish that she should not follow him. On seeing her husband going to the forests, Urmila becomes anxious to follow him and urges him to take her too. But, Lakshmana is unwilling to do so and advised her to stay back, then as a devoted wife, she obeys her husband. From the day Lakshmana retires to the forests to the day he returns to Ayodhya, that is, for fourteen long years, she remains in her bed unconscious, in deep slumber, thinking of her husband only.
After the stipulated period of fourteen years, Lakshmana returns to Ayodhya along with his brother and sister-in-law. But, unfortunately, he does not care to see his devoted wife and as usual is engrossed in the service of Rama. It is only Sita, being a woman, who sympathises with Urmila. She urges her husband to relieve Lakshmana from the service so that he may go and meet his wife.
As suggested by Rama, Lakshmana then goes to the apartment of Urmila. Having been in sleep for a long period, she at first, fails to recognise her husband. She is hardly able to open her eyes fully. Yet she has been aware of Sita's abduction by Ravana as well as the consequences. So she says:
Isn't it by having the desire
of acquiring another's wife that
Indra's body was spoiled?
Isn't by having the desire
of acquiring another's wife
that Ravana suffered utter destruction?
And knowing all this before
O, you came to do such a wrong
O, have you no sister
Or mother like me?
Then comes Lakshmana's reply:
I am Rama's brother
who else is like him
in the whole creation?
And am I not the son-in-law
of King Janaka ...
Putting Ravana to death
We brought our Sita back
If I wrongly raised my hand,
O moon-faced woman,
I'd myself become infamous,
If you won't get up, my love,
I won't live any longer.
With tears rolling in his eyes, Lakshmana again says:
I'll kill myself.
Urmila immediately gets up with a shock. Convinced of Lakshmana's identity, the lotus-eyed Urmila then kneels at her husband's feet. Her joy knows no bounds when she recognises Lakshmana as her husband. He also feels happy in the company of his wife.
As Urmila stops speaking, Lakshmana, overwhelmed with sorrow, asks:
O, why still feel sorry?
He begins in a soothing tone:
In some previous birth, my love
we might have separated some pious
husband and wife that if several
ages pass, we can't resist the law of Karma
Then Lakshmana explains to her in detail Sita's abduction by Ravana.
Thus the whole story from the beginning to the end has been so well composed that the reader gets a glimpse of the pure and tender heart of a devoted Hindu wife.
Owing to the fact that these two stories are closely related to each other, they may be called twin stories. The reason for Urmila's long sleep can be found in the story of Lakshmana's laughter. The folk-poets thus cleverly account for her long sleep.
The Tilaka commentary of Nāgeśa Bhaṭṭa on Ayodhya-kāṇḍa, Sarga 56 (50 in CE), Verse 1, clarifies that the popular notion is not supported by Vālmīki Rāmāyaṇa:
When the night was over, Rama, Delight of the Raghus, gently awakened Lakshmana who was asleep. ||2.56.1||
athāvasuptaṃ svaprabodhānantaramapīṣatsuptam etena caturdaśavarṣaparyantaṃ lakṣmaṇaḥ svāpahīno 'nāhāraśceti loka pravādo 'pāstaḥ || 2.56.1 ||
(English translation/commentary by Sheldon Pollock:)
Ct. remarks that the popular belief that Lakṣmaṇa spent the entire fourteen years of exile without eating or sleeping is laid to rest by this verse.
(Lakṣmaṇa is said to remain awake throughout the fourteen-year period in the Telugu Dvipada Rāmāyaṇa of Raṅganātha, sung in Andhra Pradesh).