Is this the correct way to add a page with hook_menu()? I'm trying to create a page through hook_menu() so I can add my custom block with context instead.
function my_module_menu() {
    $items['my_page'] = array(
        'title' =&gt; 'my_page',
        'description' =&gt; 'my_page',
        'page callback' =&gt; 'my_function',
        'access callback' =&gt; true,
    );
    $items['my_page2'] = array(
        'title' =&gt; 'my_page2',
        'description' =&gt; 'my_page2',
        'page callback' =&gt; 'my_function',
        'access callback' =&gt; true,
    );
    return $items;
}

function my_function() {
    return '';
}

Is it the right way to do it?
I have some bug from time to time, like the block goes missing on those pages. Could it be related to that?
No, the menu items are fine. The problem seems with your block display configuration settings.
There is no permission with these menu items; give some loosely coupled permission (such as access content) to these callbacks. Function names should be prefixed with the module name to avoid clashes with other modules.
function my_module_menu() {
  $items['my_page'] = array(
    'title' =&gt; 'my_page',
    'description' =&gt; 'my_page',
    'page callback' =&gt; 'my_module_my_function',
    'access arguments' =&gt; 'access content',
  );

  $items['my_page2'] = array(
    'title' =&gt; 'my_page2',
    'description' =&gt; 'my_page2',
    'page callback' =&gt; 'my_module_my_function',
    'access arguments' =&gt; 'access content',
  );

  return $items;
}

function my_module_my_function() {
  return '';
}