It is vaso-vagal syncope. Sudden getting up from sitting or lying down cause blood vessels to expand and gravity further reduce blood supply to brain.
AS your family history suggests
Diabetes, get blood e examination
Sometimes heart rhythm if3not proper, you can have this.
Common cause is cold effecting labyrinth, part controlls posture, can cause.
Next Steps
don't rush in changing posture.
Health Tips
blood exam, PULSE recording ECG.