Are there any rules that say that urdhva pundra should be removed before going to bed?
No. One should not remove the Urdhvapundra before sleeping. I will provide you three sources for this:
Sleeping is an integral part of everyday worship, in particular, sleep is merely a naturally occurring result in the practice of Yoga.
The Pancharatra Agama divides a 24 hour day into five parts:
Incidentally, advaitins accept this five fold division as well.
The last part of the day (between approximately 9PM and 3AM) is called Yoga. This part is devoted to meditation. It is begun with Achamana, Pranayama and Sankalpa to practice Yoga as follows:
- First do yama, niyama, asana, pranayama, pratyahara.
- In the state of dhaarana, settle the mind on the Lord without any fluctuation gradually in accordance to the description in the Vaikunthagadyam.
- Contemplate on the Lord being the indweller of all components of the Universe. Do not let the mind retreate from this
- Those that cannot maintain this level of meditation, Recite the Bhagavad Dhyana Sopanam and meditate on Sri Ranganatha.
- Those incapable of this, establish the mind on the personal Archa deity and maintain focus by reciting either the ashtakshara or dvaya mantras.
- Do this until you fall asleep.
- When about to sleep, recite the Madhava shloka and meditate on Madhava along with Mahalakshmi. Imagine your head is placed at their feet and go to sleep.
- On the unforbidden nights, Sleep alongside your own wife who is dressed well, is free of illness, who is of pure mind. After the union is complete, sleep separately.
- If awoken from sleep, recite the name of Sri Hari and go back to sleep.
- In the Brahma Muhurta be rejuvenated with Sattva guna and let your mind be filled with happiness.
- Then meditate on the Lord as described in the way to do in the early mornings.
- Complete yoga with the sAtvika tyAgam and submit the results of the actions to the Lord.
(Source: Ramanuja's Nitya Grantha and Sri Narayana Yatindra Mahadesika's Srivaishnava-Sadachara-Nirnaya)
From this, one can infer that there is no place for removing the Urdhvapundra before sleeping, since sleeping is integrated into the practice of Yoga/Upasana of the Parabrahman.
On a different note, several Smriti texts condemn the sighting of a naked forehead. It is often compared to stepping into a cemetery (the implication being one has to take immediate bath with the very clothes one is wearing). So there is no place for a naked forehead.
E.g: Vaidyanatha Dikshita's Smritimuktaphalam quotes Atreya:
ūrdhvapuṇḍravihīnaṃ yat śarīram śavasannibham।
ūrdhvapuṇḍravihīnaṃ tu śvapākamiva saṃtyajet॥
There is another quote I have heard but don't remember the source: lalāṭaśūnyam śmaśānatulyam
If one takes a bath in a river, there are two options to perform Sandhyavandana:
- They can come to the shore, apply Urdhvapundra and re-enter the river and perform Sandhyavandana,
- They can apply "jala-Urdhvapundram" with water and perform the Sandhyavandanam upto the Arghya Pradana stage. Then they can come to the shore and must apply the Urdhvapundra before continuing the Japa.
From this we can infer that absence of Urdhvapundra on the forehead is only permitted in the brief period when one takes a dip in the river and the forehead is washed. Any further action requires either a jala-Urdhvapundram, or the actual one.
There is no explicit removal of the Urdhvapundra sactioned anywhere in scripture.
(Source: Gopala Desika's Ahnika and Sri Padukasevaka Ramanuja Mahadesika's Ahnikartha Prakasika)