The symptoms of seizure like activity while sleeping or while going to sleep can be due to restless leg syndrome,
sleep epilepsy,
sleep apnea, low vitamin B12, low blood sugar, low blood pressure
or due to arrhythmias.
Since it happens only once or twice a month, look back to check, if this could be due to low blood sugar (missing your dinner or other meals). You need a lot of investigations and a detailed examination by a sleep specialist.