Firstly I suggest going to www.alsa.es and put in your requirements. This website is is very straight-forward and easy to use. If you have trouble with this you could also try http://www.movelia.es which will detail the timetable and the costs.
It takes approx 5 hours and 15 minutes to get between Alicante and Madrid and costs between 27 euros and 45 euros - one way (correct as of July 2009, this is subject to change).
There are about 10 buses a day and there are a few different destinations within Madrid so it is a good idea to check the website to make sure that you get the right bus for you.
The first bus leaves Alicante destined for Madrid at 9.45 and the last bus is at 00.45
If you are planning on taking the ALSA bus then please do check the timetables on their website for up to date information.
Further information on Alicante Buses
Alicante to Benidorm Bus
Alicante to Barcelona Bus
Alicante to Javea Bus
Alicante to Valencia Bus
Alicante to Granada Bus
Alicante to Torrevieja Bus
Alicante to Denia Bus
Alicante to Madrid Bus
Alicante to Almeria Bus
Alicante to Altea Bus
Alicante to Murcia Bus
Alicante to Calpe Bus